[SOLVED] forgot root passwd, kernel boot in single mode still asks for root passwd
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
forgot root passwd, kernel boot in single mode still asks for root passwd
Hello everyone,
stupid me. I must have typed smth that I don't recall for a vm guest slackware I setup.
I reboot to single mode , but i still get a root and password prompt when loading finishes.
empty password is not allowed and i can't get access not even i single mode (i really thought I should)
Quote:
(none) login: root
password:
I can also try to boot with kernel params:
Quote:
single init=/bin/bash
. this time I get a prompt but I can't remount / as rw, nor change the password (passwd complains it can't get a lock on /etc/shadow)
Boot the machine with a live DVD
then edit the /etc/passwd file
the first line should be
"root:x:0:0::/root:/bin/bash"
change it to
"root::0:0::/root:/bin/bash"
If my memory is good this gives root no password
so you just hit [ENTER] for the root login password
SORRY I missed that this was a VM
john
Last edited by AlleyTrotter; 05-07-2012 at 08:04 AM.
Reason: self explanatory
Alley Trotter, i can't mount the /dev/sda1.. its a jfs volume... I thought the huge kernel has the jfs compiled in or as module...
mount says " bad fs option, bad superblock".
so no chances i mount the drive...
also i really though I could do all this without the slack dvd...
Download the SystemRescueCD, it has comes with the ability to mount JFS. Then just chroot into your /-partition and launch passwd root to change the root password. No need for editing files.
Thank you guys for the vm is gone at this point (perhaps not though at the time of your posting - but I didn't check LQ)
TobiSGD i guess many live distros would let me do what you're saying, i still would have preferred to get the password pack with what slackware has laying around. Its good to know jfs is not supported by the huge kernel of the install dvd (should it not?)
Michaelk yes that seems reasonable but no need to try it now. it seems this is what i was looking for though
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.