Beaglebone For Dummies

Although I work with PCs, most of our environment is Windows with the occasional Linux or Unix [Compaq Tru64].
As such, a lot of assumptions need to be unlearned when playing with embedded Linux for the first time… Which is why I’m working my way through all the “beginners” articles I can find.

I’ve struck a problem - and I could use some feedback.

Everyone posting startup articles knows about putting a password on root account. But - what about resetting lost / forgotten / corrupted root passwords? This is one of the first “what if” scenarios an Administrator needs to consider.

Usually, I’d init to runlevel zero, and hack the root password there - but I can’t find how to do this on the 'bone. At the moment, all I can do is make backup images of the SDHC on my PC - and put the root password in the image filename.

Other techniques would require mounting the SDHC on my [windows] PC, and manhandling password files. If anyone has any suggestions on how to do this, or other root password rest techniques, I’d like to hear them.

Regards,

– Alan Campbell

Everyone posting startup articles knows about putting a password on
root account. But - what about resetting lost / forgotten / corrupted
root passwords? This is one of the first "what if" scenarios an
Administrator needs to consider.

You can generate an encrypted key and replace the one in /etc/shadow.
See this thread:
http://serverfault.com/questions/87874/how-should-someone-create-an-encrypted-password-for-etc-shadow

This assumes your distribution is using /etc/shadow, which is not a
given.

Usually, I'd init to runlevel zero, and hack the root password there -
but I can't find how to do this on the 'bone. At the moment, all I can
do is make backup images of the SDHC on my PC - and put the root
password in the image filename.

Place the SD card in your desktop and mount the rootfs partition. Then
edit /etc/shadow as the root user to update the encrypted key.

You can generate an encrypted key and replace the one in /etc/shadow.
See this thread:
http://serverfault.com/questions/87874/how-should-someone-create-an-encrypted-password-for-etc-shadow

True, and thanks for the reminder. However, only root can write to the shadow file.
Which reminds me:

Place the SD card in your desktop and mount the rootfs partition. Then
edit /etc/shadow as the root user to update the encrypted key.


Michael J. Hammel mjha...@graphics-muse.org

Michael, are you assuming I’m running Linux on my PC? I’m on Windows. Not so much as a Live CD distribution.
I’m documenting my fun, for the benefit of anyone with Windows who wants to venture into Linux-land with a micro board.
Some will do that with the Pi. I’m doing it with the 'Bone because I think it has better interface options.

However, you’ve given me an idea for a “spare” card -

  1. boot with the spare
  2. stick the “locked out” card in a USB reader, shove that on the SB port of the Bone
  3. mount the card and edit the shadow file, as per your suggestion.

Unless you can suggest a program that mounts Linux partitions under Windows, that will have to suffice.
Thanks for the feedback,

– Alan Campbell

Hi,

my be this is an option for you:

If you have a spare usbstick you can install for example
DamnSmallLinux on it: http://www.damnsmalllinux.org/

With such an usbstick you can quickly boot a Linux with
you WIndows PC without touching the Windows installation
accidentally.

With DamnSmallLinux running, insert the "locked" SD-Card
also, and fix the password as already described.

Just another way...may be useful for other purposes also,
where a "Swiss-Army-knife"-Linux becomes handy :wink:

Best regards.
mcc

sa_Penguin <soupie62@gmail.com> [12-11-11 05:40]: