Yes, same concept. Once you have the system booted, set your password then copy the /etc/passwd file over to the other partition. I forget if the default BB image uses shadow password file so if there's no password data in the passwd file you might need to copy over the /etc/shadow file too. Make sure to preserve the user and group ownership and permissions too.
J On Wed, Apr 10, 2019, 7:25 AM Dan Sloane <[email protected] wrote: > Hi - do you think this process would work for recovering /etc/passwd when, > despite typing it three times (change, confirm, into notes), my new debian > user password isn't accepted. > > Single user mode on BBB seems non-trivial and I'd rather not start again > with my config. > > Thanks, > Dan > > > On Tuesday, 19 March 2019 15:25:51 UTC, Dennis Lee Bieber wrote: >> >> On Tue, 19 Mar 2019 03:56:36 -0700 (PDT), >> [email protected] declaimed the >> following: >> >> >Hi, >> > I did a some change in sudoers file, so i can not be root , i can not >> use >> >sudo or su >> >debian@beaglebone: sudo su - >> >sudo: >>> /etc/sudoers: syntax error near line 23 <<< >> >sudo: parse error in /etc/sudoers near line 23 >> >sudo: no valid sudoers sources found, quitting >> >sudo: unable to initialize policy plugin >> > >> >How can I correct this file ? >> >> If that is in the eMMC, boot with a fresh SD card image. >> If that is in an SD card, remove it and boot from the eMMC image >> >> THEN >> Mount the other device (insert the SD card if booting from eMMC) >> somewhere into the file system... >> Copy the good /etc/sudoers file from the booted system to >> /whereever/mounted/etc/sudoers... >> >> Dismount, reboot >> >> And, as mentioned elsewhere, only use "visudo" to edit the >> sudoers >> file; do not edit it by hand using any other command. >> >> >> -- >> Wulfraed Dennis Lee Bieber AF6VN >> [email protected] HTTP://wlfraed.home.netcom.com/ >> >> -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beagleboard/c11f2484-d22a-4e67-89b9-a27b306eeb6c%40googlegroups.com > <https://groups.google.com/d/msgid/beagleboard/c11f2484-d22a-4e67-89b9-a27b306eeb6c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAGS%2B2h_dqB5y4qYcL%3D6g8aEP0jbLRbnTdVwtCy1XZELsgn3Geg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
