BIG problem with BBB and logging into ANY username

175 views
Skip to first unread message

Bob Hammond

unread,
Mar 27, 2021, 8:39:21 AM3/27/21
to BeagleBoard
I duplicated my BBB setup to a SD card using this procedure:

Debian distribution:

  1. Boot master BBB with no SD card in
  2. Insert SD card
  3. Log in (e.g. with serial terminal, SSH etc.) and run sudo /opt/scripts/tools/eMMC/beaglebone-black-make-microSD-flasher-from-eMMC.sh. LEDs will flash in sequence whilst SD card is being written.
  4. When the LEDs stop and the script terminates, remove the SD card.
  5. Insert SD card into new BBB then power on.
  6. eMMC will be flashed; LEDs on new BBB will flash in sequence until complete.
After doing this, I rebooted the BBB.

Now, I am unable to remotely log in using PuTTY, user is root, and root password.  Or any other username and password.

The BBB is running fine (collecting seismic data) but I am completely locked out!

Any suggestions on how to get access to the BBB?

amf

unread,
Mar 27, 2021, 7:12:17 PM3/27/21
to BeagleBoard
I followed your instructions, once I obtained the new ip, I was able to login as the user of the origanl BBB.
Without knowing details of your setup it is difficult to help
is your desktop/laptop a windows or linux machine?
if linux you can get the ip of the new BBB with "ping <hostname>.local" provided 'avahi' is installed (there may be other ways, this works for me)

ping beaglebone.local
PING beaglebone.local (192.168.3.108) 56(84) bytes of data.
64 bytes from 192.168.3.108: icmp_seq=1 ttl=64 time=1.31 ms

if windows, someone else will need to chime in,

Tom Paratore

unread,
Mar 27, 2021, 7:41:30 PM3/27/21
to beagl...@googlegroups.com
Try logging in as user : debian
Password: temppwd 

Check your spelling after u enter user name 

Sent from my iPhone

On Mar 27, 2021, at 7:12 PM, amf <fitte...@gmail.com> wrote:


--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/833795ff-61b4-418c-a142-9aed980e01a7n%40googlegroups.com.

Bob Hammond

unread,
Mar 28, 2021, 8:43:56 AM3/28/21
to BeagleBoard
I am able to connect to the BBB with PuTTY and get a prompt to log in.  I have tried debian/temppwd and that doesn't work.

I've read about using a serial connection to the BBB and interrupting the boot sequence to gain access.  Anyone done that?

Bob Hammond

unread,
Mar 28, 2021, 8:48:43 AM3/28/21
to beagl...@googlegroups.com
I am using a windows machine with PuTTY to connect to the BBB.

You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/KvIoUzehk_o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/0fea8e1c-4c08-43cc-a023-5fce0b05209en%40googlegroups.com.

Andrea Sannuto

unread,
Mar 28, 2021, 9:05:22 AM3/28/21
to beagl...@googlegroups.com
I found this for the serial connection.


Some ideas :
Once in as root, I would 
- change the root password :
# passwd
- The user password:
# passwd username
Check the logs focus in the time you had attempted the remote login - find why it was not allowed to login.
Check the sshd service is enabled  (however should be up) 
Have you hardened your configuration? Ie any firewall (iptables) , any fail2ban or something else;
Enforced  sshd to accept only user connection (no root)?

A.

jonnymo

unread,
Mar 28, 2021, 12:32:12 PM3/28/21
to Beagle Board
Are you using Windows or Linux on your host PC?  Since you mention PuTTY, I would assume it is windows.
You could try to connect to the BB using the USB Network options:

Are you certain the IP you are connecting to is the new BB?  
How is the BB connected to your network?

If you can get a serial or USB Network connection you can check for the IP with"
   $ ip a

If you have another Linux system on your network, you can scan for IPs with the following:
NOTE: Chane 192.168.1.x to what is appropriate for your network.
     $ for i in {1..255}; do (ping 192.168.1.$i -c 1 -w 5 >/dev/null && echo "192.168.1.$i" &); done

Cheers,

Jon

Bob Hammond

unread,
Mar 28, 2021, 12:39:40 PM3/28/21
to beagl...@googlegroups.com
PuTTY (and WinSCP) are used on a host PC running Windows 7 Professional.  Yes, I'm certain of the IPs for both BBB.  Both BBB are connected to my network via hardwire to a switch.

I can see both BBB using web pages (and therefore IP addresses) I set up on them.  Both are running ok.  Both ping ok.  Both can be accessed via PuTTY and WinSCP.
So, they are functional.

I just simply cannot log into them with any known username/password.

Bob

jonnymo

unread,
Mar 28, 2021, 12:47:50 PM3/28/21
to Beagle Board
What is the error that you are seeing when the login fails?

Jon

Bob Hammond

unread,
Mar 28, 2021, 1:02:41 PM3/28/21
to beagl...@googlegroups.com
Upon typing the password, I get:

Access denied.


Robert Heller

unread,
Mar 28, 2021, 1:16:55 PM3/28/21
to beagl...@googlegroups.com, beagl...@googlegroups.com, Robert Heller
At Sun, 28 Mar 2021 10:01:55 -0700 beagl...@googlegroups.com wrote:

>
> Upon typing the password, I get:
>
> Access denied.

Question: were you ever able to login to these machines in the past?
(Obvious, but needs to be asked): do you have the caps lock key on? The stock
username and password are in all *lower case* and both the username and
password are case sensitive.

Are these machines running a stock microSD image?
>
>
> On Sun, Mar 28, 2021 at 9:47 AM jonnymo <jonn...@gmail.com> wrote:
>
> > What is the error that you are seeing when the login fails?
> >
> > Jon
> >
> > On Sun, Mar 28, 2021 at 9:39 AM Bob Hammond <propg...@gmail.com> wrote:
> >
> >> PuTTY (and WinSCP) are used on a host PC running Windows 7 Professional.
> >> Yes, I'm certain of the IPs for both BBB. Both BBB are connected to my
> >> network via hardwire to a switch.
> >>
> >> I can see both BBB using web pages (and therefore IP addresses) I set up
> >> on them. Both are running ok. Both ping ok. Both can be accessed via
> >> PuTTY and WinSCP.
> >> So, they are functional.
> >>
> >> I just simply cannot log into them with any known username/password.
> >>
> >> Bob
> >>
> >> On Sun, Mar 28, 2021 at 9:32 AM jonnymo <jonn...@gmail.com> wrote:
> >>
> >>> Are you using Windows or Linux on your host PC? Since you mention
> >>> PuTTY, I would assume it is windows.
> >>> You could try to connect to the BB using the USB Network options:
> >>>
> >>> https://www.digikey.com/en/maker/blogs/how-to-connect-a-beaglebone-black-to-the-internet-using-usb
> >>>
> >>> Are you certain the IP you are connecting to is the new BB?
> >>> How is the BB connected to your network?
> >>>
> >>> If you can get a serial or USB Network connection you can check for the
> >>> IP with"
> >>> $ *ip a*
> >>>
> >>> If you have another Linux system on your network, you can scan for IPs
> >>> with the following:
> >>> NOTE: Chane 192.168.1.x to what is appropriate for your network.
> >>> $ *for i in {1..255}; do (ping 192.168.1.$i -c 1 -w 5 >/dev/null
> >>> && echo "192.168.1.$i" &); done*
> >>>
> >>> Cheers,
> >>>
> >>> Jon
> >>>
> >>> On Sun, Mar 28, 2021 at 5:48 AM Bob Hammond <propg...@gmail.com>
> >>> wrote:
> >>>
> >>>> I am using a windows machine with PuTTY to connect to the BBB.
> >>>>
> >>>> On Sun, Mar 28, 2021 at 5:44 AM Bob Hammond <propg...@gmail.com>
> >>>> wrote:
> >>>>
> >>>>> I am able to connect to the BBB with PuTTY and get a prompt to log
> >>>>> in. I have tried debian/temppwd and that doesn't work.
> >>>>>
> >>>>> I've read about using a serial connection to the BBB and interrupting
> >>>>> the boot sequence to gain access. Anyone done that?
> >>>>>
> >>>>> On Saturday, March 27, 2021 at 4:41:30 PM UTC-7 myi...@hotmail.com
> >>>>> wrote:
> >>>>>
> >>>>>> Try logging in as user : debian
> >>>>>> Password: temppwd
> >>>>>>
> >>>>>> Check your spelling after u enter user name
> >>>>>>
> >>>>>> Sent from my iPhone
> >>>>>>
> >>>>>> On Mar 27, 2021, at 7:12 PM, amf <fitte...@gmail.com> wrote:
> >>>>>>
> >>>>>> 
> >>>>>>
> >>>>>> I followed your instructions, once I obtained the new ip, I was able
> >>>>>> to login as the user of the origanl BBB.
> >>>>>> Without knowing details of your setup it is difficult to help
> >>>>>> is your desktop/laptop a windows or linux machine?
> >>>>>> if linux you can get the ip of the new BBB with "ping
> >>>>>> <hostname>.local" provided 'avahi' is installed (there may be other ways,
> >>>>>> this works for me)
> >>>>>>
> >>>>>> ping beaglebone.local
> >>>>>> PING beaglebone.local (192.168.3.108) 56(84) bytes of data.
> >>>>>> 64 bytes from 192.168.3.108: icmp_seq=1 ttl=64 time=1.31 ms
> >>>>>>
> >>>>>> if windows, someone else will need to chime in,
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> On Saturday, March 27, 2021 at 7:39:21 AM UTC-5 propg...@gmail.com
> >>>>>> wrote:
> >>>>>>
> >>>>>>> I duplicated my BBB setup to a SD card using this procedure:
> >>>>>>>
> >>>>>>> Debian distribution:
> >>>>>>>
> >>>>>>> 1. Boot master BBB with no SD card in
> >>>>>>> 2. Insert SD card
> >>>>>>> 3. Log in (e.g. with serial terminal, SSH etc.) and run sudo
> >>>>>>> /opt/scripts/tools/eMMC/beaglebone-black-make-microSD-flasher-from-eMMC.sh.
> >>>>>>> LEDs will flash in sequence whilst SD card is being written.
> >>>>>>> 4. When the LEDs stop and the script terminates, remove the SD
> >>>>>>> card.
> >>>>>>> 5. Insert SD card into new BBB then power on.
> >>>>>>> 6. eMMC will be flashed; LEDs on new BBB will flash in sequence
> >>>>>>> until complete.
> >>>>>>>
> >>>>>>> After doing this, I rebooted the BBB.
> >>>>>>>
> >>>>>>> Now, I am unable to remotely log in using PuTTY, user is root, and
> >>>>>>> root password. Or any other username and password.
> >>>>>>>
> >>>>>>> The BBB is running fine (collecting seismic data) but I am
> >>>>>>> completely locked out!
> >>>>>>>
> >>>>>>> Any suggestions on how to get access to the BBB?
> >>>>>>>
> >>>>>> --
> >>>>>> For more options, visit http://beagleboard.org/discuss
> >>>>>> ---
> >>>>>> You received this message because you are subscribed to the Google
> >>>>>> Groups "BeagleBoard" group.
> >>>>>> To unsubscribe from this group and stop receiving emails from it,
> >>>>>> send an email to beagleboard...@googlegroups.com.
> >>>>>> To view this discussion on the web visit
> >>>>>> https://groups.google.com/d/msgid/beagleboard/833795ff-61b4-418c-a142-9aed980e01a7n%40googlegroups.com
> >>>>>> <https://groups.google.com/d/msgid/beagleboard/833795ff-61b4-418c-a142-9aed980e01a7n%40googlegroups.com?utm_medium=email&utm_source=footer>
> >>>>>> .
> >>>>>>
> >>>>>> --
> >>>>> For more options, visit http://beagleboard.org/discuss
> >>>>> ---
> >>>>> You received this message because you are subscribed to a topic in the
> >>>>> Google Groups "BeagleBoard" group.
> >>>>> To unsubscribe from this topic, visit
> >>>>> https://groups.google.com/d/topic/beagleboard/KvIoUzehk_o/unsubscribe.
> >>>>> To unsubscribe from this group and all its topics, send an email to
> >>>>> beagleboard...@googlegroups.com.
> >>>>> To view this discussion on the web visit
> >>>>> https://groups.google.com/d/msgid/beagleboard/0fea8e1c-4c08-43cc-a023-5fce0b05209en%40googlegroups.com
> >>>>> <https://groups.google.com/d/msgid/beagleboard/0fea8e1c-4c08-43cc-a023-5fce0b05209en%40googlegroups.com?utm_medium=email&utm_source=footer>
> >>>>> .
> >>>>>
> >>>> --
> >>>> For more options, visit http://beagleboard.org/discuss
> >>>> ---
> >>>> You received this message because you are subscribed to the Google
> >>>> Groups "BeagleBoard" group.
> >>>> To unsubscribe from this group and stop receiving emails from it, send
> >>>> an email to beagleboard...@googlegroups.com.
> >>>> To view this discussion on the web visit
> >>>> https://groups.google.com/d/msgid/beagleboard/CAKoB7OpieQonkXW003iq5APE2Ze74UMWBOrpNXF6q%3DSp8vZwMg%40mail.gmail.com
> >>>> <https://groups.google.com/d/msgid/beagleboard/CAKoB7OpieQonkXW003iq5APE2Ze74UMWBOrpNXF6q%3DSp8vZwMg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> >>>> .
> >>>>
> >>> --
> >>> For more options, visit http://beagleboard.org/discuss
> >>> ---
> >>> You received this message because you are subscribed to a topic in the
> >>> Google Groups "BeagleBoard" group.
> >>> To unsubscribe from this topic, visit
> >>> https://groups.google.com/d/topic/beagleboard/KvIoUzehk_o/unsubscribe.
> >>> To unsubscribe from this group and all its topics, send an email to
> >>> beagleboard...@googlegroups.com.
> >>> To view this discussion on the web visit
> >>> https://groups.google.com/d/msgid/beagleboard/CAG99bkrwOYSFqTC3u8x3CobrjSaF25HMKqCDsBoxWufCxi%2Bjeg%40mail.gmail.com
> >>> <https://groups.google.com/d/msgid/beagleboard/CAG99bkrwOYSFqTC3u8x3CobrjSaF25HMKqCDsBoxWufCxi%2Bjeg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> >>> .
> >>>
> >> --
> >> For more options, visit http://beagleboard.org/discuss
> >> ---
> >> You received this message because you are subscribed to the Google Groups
> >> "BeagleBoard" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an
> >> email to beagleboard...@googlegroups.com.
> >>
> > To view this discussion on the web visit
> >> https://groups.google.com/d/msgid/beagleboard/CAKoB7Ootoj6dw%3Dc3ut2pRy3%3Dnfo7diE6%2BBjp3b5WnSB3JmPdwQ%40mail.gmail.com
> >> <https://groups.google.com/d/msgid/beagleboard/CAKoB7Ootoj6dw%3Dc3ut2pRy3%3Dnfo7diE6%2BBjp3b5WnSB3JmPdwQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> >> .
> >>
> > --
> > For more options, visit http://beagleboard.org/discuss
> > ---
> > You received this message because you are subscribed to a topic in the
> > Google Groups "BeagleBoard" group.
> > To unsubscribe from this topic, visit
> > https://groups.google.com/d/topic/beagleboard/KvIoUzehk_o/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to
> > beagleboard...@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/beagleboard/CAG99bkp%2BCm4QPNnVPLiLpEF664GqGoXovcfHw3HWFPWyoid1-A%40mail.gmail.com
> > <https://groups.google.com/d/msgid/beagleboard/CAG99bkp%2BCm4QPNnVPLiLpEF664GqGoXovcfHw3HWFPWyoid1-A%40mail.gmail.com?utm_medium=email&utm_source=footer>
> > .
> >
>

--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
hel...@deepsoft.com -- Webhosting Services

Bob Hammond

unread,
Mar 28, 2021, 2:21:39 PM3/28/21
to beagl...@googlegroups.com
As I said in the first post on this issue:  I had run the procedure to make an image of the functional BBB on which I could log into with both a username and with root.  After I ran that procedure, I was then unable to log in with ANY username and password.

The caps lock is off.  Yes, I know that UNIX/Linux is case sensitive.

Both BBB are running a recent version of Debian with custom code for seismic data collection via a digitizer cape.

I have an identical BBB with an identical digitizer cape running the same microSD image as the problem BBB that I CAN log into with both a username as well as root.  So, I know the image works properly.



Robert Heller

unread,
Mar 28, 2021, 2:36:05 PM3/28/21
to beagl...@googlegroups.com, beagl...@googlegroups.com, Robert Heller
At Sun, 28 Mar 2021 11:20:51 -0700 beagl...@googlegroups.com wrote:

>
> As I said in the first post on this issue: I had run the procedure to make
> an image of the functional BBB on which I could log into with both a
> username and with root. After I ran that procedure, I was then unable to
> log in with ANY username and password.
>
> The caps lock is off. Yes, I know that UNIX/Linux is case sensitive.
>
> Both BBB are running a recent version of Debian with custom code for
> seismic data collection via a digitizer cape.
>
> I have an identical BBB with an identical digitizer cape running the same
> microSD image as the problem BBB that I CAN log into with both a username
> as well as root. So, I know the image works properly.
>

OK, somehow you have managed (?) to either change the usernames or passwords
or have done something to mess up file permssions. You only choise is to
either use another Linux machine to mount the file system on the SD can hack
things (eg fix the file system perms or hand edit the password file). Or boot
the machine into single user mode -- this will mean you need to get a FTTI
server port cable and intercept the boot process and edit the boot command
line in the uBoot CLI.

Question: I am assuming you are booting a uSD card. Is there an O/S in the
eMMC? If you can you boot that and log into that? If so, pull the uSD card
out, boot the eMMC and then reisert the uSD card. You will now have a Linux
system that can mount the uSD card and you can see what happened and maybe fix
things.
> > > >>>>>> 

Bob Hammond

unread,
Mar 28, 2021, 2:41:29 PM3/28/21
to beagl...@googlegroups.com
Thanks Robert.  I will give those ideas a try.



Bob Hammond

unread,
Mar 29, 2021, 9:27:52 AM3/29/21
to BeagleBoard
Thanks Andrea.  Once I get in, I will check the logs.  The sshd is likely up as you state.  The BBB is protected by a firewall on my router as well as iptables.  And no, I didn't have enforced sshd to accept only user connection.

All very good ideas!

Bob Hammond

unread,
Mar 30, 2021, 10:02:25 AM3/30/21
to BeagleBoard
I am now attempting to get into GRUB during boot.  I never see a GRUB menu show up by pressing/holding ESC or left shift.  What I do see is that I can interrupt boot by pressing the spacebar.  I then get a command prompt in ??.  And I have no idea what to do after that.

amf

unread,
Mar 30, 2021, 11:51:56 AM3/30/21
to BeagleBoard
If you just want to reset the password on the new imaged BBB (this does not explain why you had issue in the first place, but does allow you to access the system)
clear the encrypted password as follows, (if you need detailed steps let me know)
create a sdcard with a new image (one you download) and boot the BBB with it.
then mount the emmc device
edit /etc/shadow file in the mounted emmc device (requires sudo)
find the user name you want to remove the password on
for example, my user name is 'amf'
amf:$6$jlBY96dq$V7tFs2xEv.a3kXArkyTEcEbGDX43d6UpzMcy/aplV8khxUFJKPMg0ugGBfWVZMpJRpaMXAATEAb5inu7/G.Iz1:16406:0:99999:7:::
delete the stuff between the first two '::'
pi::16406:0:99999:7:::
save the shadow file
power off the BBB
remove sdcard, and power on the BBB
log in with the user name that the encrypted password was deleted on, no login password is required, then set new password for the user.

Hope this helps.
amf

Dennis Lee Bieber

unread,
Mar 30, 2021, 1:19:43 PM3/30/21
to Beagleboard
On Tue, 30 Mar 2021 07:02:25 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Bob Hammond
<propgrinder-Re5JQ...@public.gmane.org> wrote:


>I am now attempting to get into GRUB during boot. I never see a GRUB menu
>show up by pressing/holding ESC or left shift. What I do see is that I can
>interrupt boot by pressing the spacebar. I then get a command prompt in
>??. And I have no idea what to do after that.

What leads you to believe the Beagles have GRUB installed?. The
boot-loader is u-Boot.

https://www.denx.de/wiki/U-Bootdoc/BasicCommandSet
(or, the whole shmear as a PDF
http://www.denx.de/wiki/publish/U-Bootdoc/U-Bootdoc.pdf )

Raspberry-Pi's don't use GRUB either, nor do most all ARM-based boards
(Xylinx Zynq, etc.)


--
Dennis L Bieber

Robert Heller

unread,
Mar 30, 2021, 1:36:22 PM3/30/21
to beagl...@googlegroups.com, Beagleboard, Robert Heller
Right. GRUB is pretty much a x86-only program. Most ARM boards use uBoot.
The Raspberry-Pi's use their own thing and are the only (?) ARM boards that
that need a FAT /boot partition.

Typing 'help' at the boot loader prompt will get you a list of commands.

Dennis Lee Bieber

unread,
Mar 30, 2021, 2:01:30 PM3/30/21
to Beagleboard
On Tue, 30 Mar 2021 13:36:11 -0400 (EDT), in
gmane.comp.hardware.beagleboard.user Robert Heller
<heller-2/ccJrXdU8tWk0Htik3J/w...@public.gmane.org> wrote:


>Right. GRUB is pretty much a x86-only program. Most ARM boards use uBoot.
>The Raspberry-Pi's use their own thing and are the only (?) ARM boards that
>that need a FAT /boot partition.
>

Yeah, the R-Pi is weird... as I recall, the graphics core is what gets
started at boot, and IT is what loads the Linux image into the ARM
processor. Though the newer SoCs may do things differently (the foundation
pages mention that is an interactive bootload is needed, one should use
u-Boot -- which may imply a way to have the GPU load a secondary
boot-loader... actually, Google found one site that mentions replacing the
kernel.img file with one containing u-Boot... Which would make it a third
stage bootloader; first and second stage loaders running in the proprietary
GPU)



--
Dennis L Bieber

Bob Hammond

unread,
Mar 31, 2021, 12:11:44 PM3/31/21
to beagl...@googlegroups.com
amf,

THIS works great!  Thanks so much for the help.

Bob Hammond

unread,
Mar 31, 2021, 1:24:34 PM3/31/21
to beagl...@googlegroups.com
Well, I thought it worked great but it doesn't.

I applied all these commands to the BBB in question and specifically to the root password entry but I am still unable to get into it.
When I attempt to log in with root, and enter a null password, I still get "access denied".  Same with all other usernames and passwords.

Could it be a file permissions problem?

Bob Hammond

unread,
Mar 31, 2021, 1:59:59 PM3/31/21
to beagl...@googlegroups.com

debian@beaglebone:/mnt/media/etc$ su root
Password:
su: Authentication failure
debian@beaglebone:/mnt/media/etc$ su root
Password:
su: Authentication failure
debian@beaglebone:/mnt/media/etc$ sudo nano shadow
  GNU nano 2.7.4                                             File: shadow

root::18717:0:99999:7:::
daemon:*:18112:0:99999:7:::
bin:*:18112:0:99999:7:::
sys:*:18112:0:99999:7:::
sync:*:18112:0:99999:7:::
games:*:18112:0:99999:7:::
man:*:18112:0:99999:7:::
lp:*:18112:0:99999:7:::
mail:*:18112:0:99999:7:::
news:*:18112:0:99999:7:::
uucp:*:18112:0:99999:7:::
proxy:*:18112:0:99999:7:::
www-data:*:18112:0:99999:7:::
backup:*:18112:0:99999:7:::
list:*:18112:0:99999:7:::
irc:*:18112:0:99999:7:::
gnats:*:18112:0:99999:7:::
nobody:*:18112:0:99999:7:::
systemd-timesync:*:18112:0:99999:7:::
systemd-network:*:18112:0:99999:7:::
systemd-resolve:*:18112:0:99999:7:::
systemd-bus-proxy:*:18112:0:99999:7:::
_apt:*:18112:0:99999:7:::
dnsmasq:*:18112:0:99999:7:::
messagebus:*:18112:0:99999:7:::
avahi:*:18112:0:99999:7:::
sshd:*:18112:0:99999:7:::
usbmux:*:18112:0:99999:7:::
lightdm:*:18112:0:99999:7:::
debian:rcdjoac1gVi9g:18112:0:99999:7:::
bob::18717:0:99999:7:::










                                                       [ Read 31 lines ]
^G Get Help     ^O Write Out    ^W Where Is     ^K Cut Text     ^J Justify      ^C Cur Pos      ^Y Prev Page    M-\ First Line
^X Exit         ^R Read File    ^\ Replace      ^U Uncut Text   ^T To Spell     ^_ Go To Line   ^V Next Page    M-/ Last Line

jonnymo

unread,
Mar 31, 2021, 2:29:20 PM3/31/21
to Beagle Board

Try just removing the 'x' for your user in the '/etc/passwd'.  This should allow for a login with asking for a password.
Of course, backup your file and add a password once you can login.

Cheers,

Jon

Dennis Lee Bieber

unread,
Mar 31, 2021, 3:48:08 PM3/31/21
to Beagleboard
On Wed, 31 Mar 2021 10:59:10 -0700, in gmane.comp.hardware.beagleboard.user
Bob Hammond <propgrinder-Re5JQ...@public.gmane.org> wrote:

>debian@beaglebone:/mnt/media/etc$ su root
>Password:
>su: Authentication failure
>debian@beaglebone:/mnt/media/etc$ su root
>Password:
>su: Authentication failure
>debian@beaglebone:/mnt/media/etc$ sudo nano shadow
> GNU nano 2.7.4 File: shadow
>

I'm beginning to get lost in just what machine is which in this
discussion.

You obviously have some device that boots and lets you sign in. I'm
presuming you then mounted an SD card (or subdirectory of said card).

Note that, by default for quite some years, a stock Beaglebone does not
assign a password to the root account (or it is something impossible to
enter), and prevents direct login as root. Your "su root" is likely failing
for that reason. However, you do have sudo privileges (had you run sudo
recently before the above cut&paste -- on normal Beagle images, the first
run of sudo [and runs after some timeout period] prompt for the user
password, but you don't appear to have had to enter that).

Try entering

sudo su

or maybe

sudo bash

debian@beaglebone:~$ sudo su
[sudo] password for debian:
root@beaglebone:/home/debian# exit
exit
debian@beaglebone:~$ sudo bash
root@beaglebone:/home/debian# exit
exit
debian@beaglebone:~$

debian@beaglebone:~$ sudo cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
...
debian@beaglebone:~$ sudo cat /etc/shadow
root:$6$5qgZEu6UrcE6p.vz$HcTDnuyYnQDb3QCslR59OSMIor.Y4ugey8DNqPvoNDvZ8BFBZqIbQQkKBpf9SeT3Bma5xG8EsIX7bt1OWUKmV/:18493:0:99999:7:::
...

Granted, those are for the local machine. Have you tried "diff"ing the
running (eMMC?) version of the files with the files on the mounted SD? Also
compare the file owner/group and access (hmmm... group and gshadow files
too)

debian@beaglebone:~$ ls -l /etc
total 784
...
-rw-r--r-- 1 root root 1095 Feb 24 09:41 group
-rw-r--r-- 1 root root 1086 Oct 1 01:59 group-
-rw-r----- 1 root shadow 933 Feb 24 09:41 gshadow
-rw-r----- 1 root shadow 924 Oct 1 01:59 gshadow-
...
-rw-r--r-- 1 root root 1600 Aug 19 2020 passwd
-rw-r--r-- 1 root root 1533 Aug 19 2020 passwd-
...
-rw-r----- 1 root shadow 934 Aug 19 2020 shadow
-rw-r----- 1 root shadow 902 Aug 19 2020 shadow-
...
debian@beaglebone:~$

Unless you've created a lot of custom users on the SD card, it could be
worth just copying the files (using sudo) from the running machine to the
SD card, and verifying (ls) they have the correct privileges/owner/group
after the copy.


--
Dennis L Bieber

Bob Hammond

unread,
Mar 31, 2021, 4:08:29 PM3/31/21
to beagl...@googlegroups.com
Jon,

I tried your suggestion but am still unable to log in as root.  I'm still being asked for a password for root.

Bob

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

jonnymo

unread,
Mar 31, 2021, 4:27:19 PM3/31/21
to Beagle Board
Bob,

If you removed the crypted password from the shadow file, that may cause an issue. If you still have that original file, I would put it back in place and try again.  If none of this is working, then it would appear something happened to the config.  As you mentioned previously, it could be the permissions of the files.

Denis, 

 I have a stock BBB and the root password is root. I did not change that.  I can access it via su with password of root or sudo su with the debian password. I did not set these.  However, I can not login as root from a remote ssh session since that is disabled in the sshd_config. From serial port I can with root/root.

Jon



amf

unread,
Apr 1, 2021, 11:50:44 AM4/1/21
to BeagleBoard
I'm going out on the limb here, but putty seem to have an issue with logins without a password. I'm sure some one can provide more input on this.

jonnymo

unread,
Apr 1, 2021, 12:38:55 PM4/1/21
to Beagle Board
I was able to use PuTTY on Windows 10 to login to the BBB via serial without root password after editing the /etc/passwd file.  Typically the root account is set in the sshd_config to not allow remote ssh connections to a Linux system.  You have to set this to allow for root login with or without a password.

Jon

Reply all
Reply to author
Forward
0 new messages