Catch-22

If none of the more specific forums is the right place to ask

Catch-22

Postby PieterB » 2020-09-23 13:20

Hi

I just got a BeagleBone Black. It comes with Debian pre-installed. I'm a Linux knucklehead.

So, in order to set a static IP and the DNS to 8.8.8.8, I edited some files, and removed connman. It works.

I struggled to edit some files, so I changed the permission on /etc to free-for-all. Something in the line of rwxrwxrwx or something.

I need to change some things, but I can't:

I don't know what the root password is, (on the BBB it should be empty, but it isn't.)
So I can't login as root.
I have to log in as 'debian'
But I can't do things as 'sudo', I get the following.

sudo: /etc/sudoers is world writable
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin


My sudoers file contains
%sudo ALL=(ALL:ALL) ALL

and I've edited it to also contain
debian ALL=(ALL) ALL and also
debian ALL=(ALL:ALL) ALL

but is still does not work.

It seems that Debian realizes that the sudoers file is 'world writable', and then ignores the content of the sudoers file - i.e. even if a user is given sudo rights in the sudoers file, Debian will still not allow him to sudo.
But since I need to sudo in order to set the permissions on /etc to whatever it should be, I cannot change the permissions on /etc

Although this is a BeagleBone Black, I'd guess that the problem would be generic to Debian (Linux)?

Anyway, any suggestions?
PieterB
 
Posts: 5
Joined: 2020-09-23 12:50

Re: Catch-22

Postby fred44nl » 2020-09-23 13:29

you will have to add yourself to the group sudo
in Terminal you type "su -" (without quotes)
you will have to enter your password.
next you issue the command "/usr/sbin/usermod -aG sudo debian" (without quotes)
the result can be checked with "cat /etc/group | grep sudo" (without quotes)
reboot is required to become effective
Debian 10 - Buster on Compulab Fitlet2
User avatar
fred44nl
 
Posts: 203
Joined: 2018-07-14 08:54

Re: Catch-22

Postby PieterB » 2020-09-23 13:33

Thanks for your reply!

I get:


debian@beaglebone:/etc$ su -
Password:
su: Authentication failure


(I types in my 'debian' password, which is 'temppwd' )
PieterB
 
Posts: 5
Joined: 2020-09-23 12:50

Re: Catch-22

Postby PieterB » 2020-09-23 13:39

I can edit /etc/group though (I can edit everything in /etc)
Maybe I can just edit the /etc/group file?

(
when I do:
cat /etc/group | grep sudo

I get:
sudo:x:27:
)
PieterB
 
Posts: 5
Joined: 2020-09-23 12:50

Re: Catch-22

Postby sgosnell » 2020-09-23 15:35

Try asking here for the default root password: https://beagleboard.org/Community/Forums/#bone_forum_embedI'm under the impression that the board uses a modified version of Debian, not the mainline version. I could be wrong, but that has been what I've casually read. I have no real knowledge of the device, but the folks on the appropriate forum should be able to help. There seems to be a separate forum for each variant, so pick the one you have, or perhaps use the general Beaglebone forum. You're much more likely to find specific help there.
Take my advice, I'm not using it.
sgosnell
 
Posts: 864
Joined: 2011-03-14 01:49

Re: Catch-22

Postby dilberts_left_nut » 2020-09-23 17:07

PieterB wrote:so I changed the permission on /etc to free-for-all. Something in the line of rwxrwxrwx or something.
That was a very poor idea - your system is now broken - reinstall.

Alternatively, you can boot from another media and reset permissions on everything under /etc to all the different things that they should be - many hours of fun to be had there!
AdrianTM wrote:There's no hacker in my grandma...
User avatar
dilberts_left_nut
 
Posts: 5077
Joined: 2009-10-05 07:54
Location: enzed

Re: Catch-22

Postby fred44nl » 2020-09-24 15:49

PieterB wrote:(
when I do:
cat /etc/group | grep sudo

I get:
sudo:x:27:
)

when you do
cat /etc/group | grep sudo

you should get
sudo:x:27:debian

as debian is the username you have choosen
Debian 10 - Buster on Compulab Fitlet2
User avatar
fred44nl
 
Posts: 203
Joined: 2018-07-14 08:54

Re: Catch-22

Postby fred44nl » 2020-09-24 15:51

sgosnell wrote:Try asking here for the default root password


when you did install Debian, you were asked for a username, where you have choosen "debian".
you were also asked to give a password for that user.

and that is the password you should use when you use the command "su -"
Debian 10 - Buster on Compulab Fitlet2
User avatar
fred44nl
 
Posts: 203
Joined: 2018-07-14 08:54

Re: Catch-22

Postby sgosnell » 2020-09-24 15:58

I just got a BeagleBone Black. It comes with Debian pre-installed.
He didn't do the installation.
Take my advice, I'm not using it.
sgosnell
 
Posts: 864
Joined: 2011-03-14 01:49

Re: Catch-22

Postby sgage » 2020-09-24 22:18

dilberts_left_nut wrote:
PieterB wrote:so I changed the permission on /etc to free-for-all. Something in the line of rwxrwxrwx or something.
That was a very poor idea - your system is now broken - reinstall.

Alternatively, you can boot from another media and reset permissions on everything under /etc to all the different things that they should be - many hours of fun to be had there!

This. Just reinstall - far and away the easiest way to go.
sgage
 
Posts: 77
Joined: 2013-03-10 21:00

Re: Catch-22

Postby reinob » 2020-09-25 06:31

fred44nl wrote:
sgosnell wrote:Try asking here for the default root password


when you did install Debian, you were asked for a username, where you have choosen "debian".
you were also asked to give a password for that user.

and that is the password you should use when you use the command "su -"


Note that "su -" will su to root, and hence ask for root's password.
You were thinking sudo, I guess.

PS: to the OP: reinstall, and RTFM before you make /etc world writable!
reinob
 
Posts: 820
Joined: 2014-06-30 11:42

Re: Catch-22

Postby sgosnell » 2020-09-25 15:28

The Beaglebone version is installed by writing the .iso to a microSD card, not in the usual way it is done on a PC. One still needs the default root and user passwords. Those should be easily available on the Beaglebone forums, or though some elementary googling.
Take my advice, I'm not using it.
sgosnell
 
Posts: 864
Joined: 2011-03-14 01:49

Re: Catch-22

Postby PieterB » 2020-09-26 08:40

sgosnell wrote:... One still needs the default root and user passwords. Those should be easily available on the Beaglebone forums, or though some elementary googling.


Yes, except that it isn't. According to all the info available on Google and the BBB forums, the default debian 'root' password is supposed to be empty. Failing that, and rarely, it could be temppwd. None of those work, including desperation attempts such as "", '', blank, Blank, BLANK, "blank" and so forth. (Maybe they sent me a returned device on which the original owner meddled with the password - but I rather doubt that).

Anyway, thanks for caring. I'm just going to follow the general consensus and nuke the thing - which I hoped to avoid, since it means that I need to buy some other stuff.
PieterB
 
Posts: 5
Joined: 2020-09-23 12:50

Re: Catch-22

Postby kedaha » 2020-09-26 08:58

Hi,
You might try the command
sudo su -
"Please accept my resignation. I don’t care to belong to any club that will have me as a member".—Groucho Marx
User avatar
kedaha
 
Posts: 3152
Joined: 2008-05-24 12:26

Re: Catch-22

Postby reinob » 2020-09-26 09:02

kedaha wrote:Hi,
You might try the command
sudo su -


but he broke sudo (see first post), and can't su to root, because the root password is unknown.
he should reinstall and avoid breaking /etc
reinob
 
Posts: 820
Joined: 2014-06-30 11:42

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 16 guests

fashionable