BIG problem with BBB and logging into ANY username

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?

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 .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,

Try logging in as user : debian
Password: temppwd

Check your spelling after u enter user name

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?

I am using a windows machine with PuTTY to connect to the BBB.

I found this for the serial connection.

https://www.dummies.com/computers/beaglebone/how-to-connect-the-beaglebone-black-via-serial-over-usb/

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.

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

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

What is the error that you are seeing when the login fails?

Jon

Upon typing the password, I get:

Access denied.

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?

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.

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.

Thanks Robert. I will give those ideas a try.

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!

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.

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

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.)

>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.)

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.

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)