Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Catch-22
Catch-22
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?
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?
Re: Catch-22
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
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
Debian 12 - Bookworm on Acer Spin 1
Debian 12 - Bookworm on Acer Spin 1
Re: Catch-22
Thanks for your reply!
I get:
debian@beaglebone:/etc$ su -
Password:
su: Authentication failure
(I types in my 'debian' password, which is 'temppwd' )
I get:
debian@beaglebone:/etc$ su -
Password:
su: Authentication failure
(I types in my 'debian' password, which is 'temppwd' )
Re: Catch-22
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:
sudo27:
)
Maybe I can just edit the /etc/group file?
(
when I do:
cat /etc/group | grep sudo
I get:
sudo27:
)
Re: Catch-22
Try asking here for the default root password: https://beagleboard.org/Community/Forum ... orum_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.
- dilberts_left_nut
- Administrator
- Posts: 5346
- Joined: 2009-10-05 07:54
- Location: enzed
- Has thanked: 13 times
- Been thanked: 66 times
Re: Catch-22
That was a very poor idea - your system is now broken - reinstall.PieterB wrote:so I changed the permission on /etc to free-for-all. Something in the line of rwxrwxrwx or something.
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...
Re: Catch-22
when you doPieterB wrote: (
when I do:
cat /etc/group | grep sudo
I get:
sudo27:
)
cat /etc/group | grep sudo
you should get
sudo27:debian
as debian is the username you have choosen
Debian 10 - Buster on Compulab Fitlet2
Debian 12 - Bookworm on Acer Spin 1
Debian 12 - Bookworm on Acer Spin 1
Re: Catch-22
when you did install Debian, you were asked for a username, where you have choosen "debian".sgosnell wrote:Try asking here for the default root password
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
Debian 12 - Bookworm on Acer Spin 1
Debian 12 - Bookworm on Acer Spin 1
Re: Catch-22
He didn't do the installation.I just got a BeagleBone Black. It comes with Debian pre-installed.
Take my advice, I'm not using it.
Re: Catch-22
This. Just reinstall - far and away the easiest way to go.dilberts_left_nut wrote:That was a very poor idea - your system is now broken - reinstall.PieterB wrote:so I changed the permission on /etc to free-for-all. Something in the line of rwxrwxrwx or something.
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!
Re: Catch-22
Note that "su -" will su to root, and hence ask for root's password.fred44nl wrote:when you did install Debian, you were asked for a username, where you have choosen "debian".sgosnell wrote:Try asking here for the default root password
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 -"
You were thinking sudo, I guess.
PS: to the OP: reinstall, and RTFM before you make /etc world writable!
Re: Catch-22
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.
Re: Catch-22
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).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.
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.
Re: Catch-22
Hi,
You might try the command
sudo su -
You might try the command
sudo su -
DebianStable
Code: Select all
$ vrms
No non-free or contrib packages installed on debian! rms would be proud.
Re: Catch-22
this can help http://forums.debian.net/viewtopic.php?f=16&t=146740PieterB wrote: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.
Re: Catch-22
Or maybe just sudo su without the hyphen as detailed in this link:
beaglebone-and-the-root-superuser?
beaglebone-and-the-root-superuser?
DebianStable
Code: Select all
$ vrms
No non-free or contrib packages installed on debian! rms would be proud.
Re: Catch-22
Please read again the first post :)kedaha wrote:Or maybe just sudo su without the hyphen as detailed in this link:
beaglebone-and-the-root-superuser?
sudo is not working in his installation anymore, because he made /etc world-writable.
Code: Select all
sudo: /etc/sudoers is world writable
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
Re: Catch-22
Ha! I was assuming he would've reinstalled as advised.
DebianStable
Code: Select all
$ vrms
No non-free or contrib packages installed on debian! rms would be proud.
Re: Catch-22
Okay, just to bring closure to this, as info for anyone at all interested, and as a guide for anyone who worked themselves into a similar situation:
I did indeed re-install debian on my BeagleBone Black.
That involved buying a USB/microHD Card Reader, and an 8Gb microSD card, downloading and installing the balenaEtcher tool on my laptop, and downloading the latest BBB debian image from the Beaglebone site.
https://www.balena.io/etcher/
https://beagleboard.org/latest-images
There are 2 debian images, one is intended to configure the microSD as a boot source, and the other is to automatically flash the debian image to the BBB eMMC on-board flash storage after it has booted (referred to as "Flasher" images). I chose the latter.
I then wrote the image I downloaded to the microSD card using 'BalenaEtcher'.
After the image is written, you power down the BBB, insert the microSD it into the BBB card slot, and re-apply power while holding down the 'Boot' button on the BBB, which causes it to boot from the microSD instead of the eMMC. Since I downloaded the image which transfers itself to the eMMC after boot, that is what it did. In the process, it powered down the BBB a few times, so I just removed the power source and re-applied it every time. (O yes, I'm using the 5V power socket on the BBB with a 5V DC power supply).
The new debian image I downloaded is somewhat different from the one that came pre-installed, and I recommend the above procedure for anyone as a first step after getting a new BBB.
The Browser interface is very different and includes a fully-fledged development IDE, together with some sample projects.
Setting up a static IP is a lot easier, and does not seem to stuff-up the BBB's concept of a DNS, which happens on the pre-installed debian.
O yes, and I can now 'sudo'.
I still do not know what the root password is, but I can do "sudo su -" with the 'debian' password which makes me a super user, so I can probably set the root password myself, or at least find out what it is.
(I'd like to know what the root password is, because I'd rather edit system configuration files with WinSCP than with nano or vim or whatever, and you can only do that with WinSCP of you have root access to those files. Which is why I gave universal privileges to the /etc folder to begin with).
Anyway, thanks for the feedback. Maybe this can be helpful to some others, as well.
I did indeed re-install debian on my BeagleBone Black.
That involved buying a USB/microHD Card Reader, and an 8Gb microSD card, downloading and installing the balenaEtcher tool on my laptop, and downloading the latest BBB debian image from the Beaglebone site.
https://www.balena.io/etcher/
https://beagleboard.org/latest-images
There are 2 debian images, one is intended to configure the microSD as a boot source, and the other is to automatically flash the debian image to the BBB eMMC on-board flash storage after it has booted (referred to as "Flasher" images). I chose the latter.
I then wrote the image I downloaded to the microSD card using 'BalenaEtcher'.
After the image is written, you power down the BBB, insert the microSD it into the BBB card slot, and re-apply power while holding down the 'Boot' button on the BBB, which causes it to boot from the microSD instead of the eMMC. Since I downloaded the image which transfers itself to the eMMC after boot, that is what it did. In the process, it powered down the BBB a few times, so I just removed the power source and re-applied it every time. (O yes, I'm using the 5V power socket on the BBB with a 5V DC power supply).
The new debian image I downloaded is somewhat different from the one that came pre-installed, and I recommend the above procedure for anyone as a first step after getting a new BBB.
The Browser interface is very different and includes a fully-fledged development IDE, together with some sample projects.
Setting up a static IP is a lot easier, and does not seem to stuff-up the BBB's concept of a DNS, which happens on the pre-installed debian.
O yes, and I can now 'sudo'.
I still do not know what the root password is, but I can do "sudo su -" with the 'debian' password which makes me a super user, so I can probably set the root password myself, or at least find out what it is.
(I'd like to know what the root password is, because I'd rather edit system configuration files with WinSCP than with nano or vim or whatever, and you can only do that with WinSCP of you have root access to those files. Which is why I gave universal privileges to the /etc folder to begin with).
Anyway, thanks for the feedback. Maybe this can be helpful to some others, as well.