what to do if lost password

Michael Havens bmike1 at gmail.com
Wed May 27 07:17:06 MST 2015


I got a friend upon whose computer (old XP) I installed Linux. She called
me last night  because she forgot the password. Well, I asked the Florida
user group about what to do and this is what they had to say:


Just use GRUB to boot into single user mode / recovery mode.

Append *init=/bin/sh* to the kernel command line, then mount the root
filesystem (if it isn't already done for you) and run *passwd *to reset the
root password or *password user *to reset user's password.


http://www.debuntu.org/how-to-recover-root-password-under-linux-with-single-user-mode/
I'd bring a CD containing System Rescue CD just in case.

http://www.sysresccd.org/SystemRescueCd_Homepage

By the way, you can bust back into borked VMs with System Rescue CD ISO
files, too.

By the way, if you use System Rescue CD, do something like this,
assuming her / is the mountpoint for /dev/sda1:

mount /dev/sda1 /mnt
chroot /mnt/ bash
cd /etc
vi passwd

Now delete the x between the first and second colons, for both user
root and her ordinary username, then quit vi

exit
umount /mnt
reboot

Now, when asked for her password, leave it blank and she'll get in.
Then she can change her password as desired. Same thing's true the
first time she logs in as root.

If she's not trustworthy enough to leave with blank passwords, you
could probably use the passwd program after the chroot to change the
passwords.
:-)~MIKE~(-:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phxlinux.org/pipermail/plug-discuss/attachments/20150527/984244ca/attachment.html>


More information about the PLUG-discuss mailing list