Results 1 to 6 of 6
I was editing a user in Kuser (added a user to 2 groups). When I exited, it gave me an error on not being able to write to 'shadow'. Now, ...
- 05-21-2005 #1
Root password gone?
I was editing a user in Kuser (added a user to 2 groups). When I exited, it gave me an error on not being able to write to 'shadow'. Now, I can not log on at all (both the user password and root passwords do not work, it gives me an error that the logon failed). The distro is Morphix. I am afraid that I'll have to reinstall
Stumbling around the 'net:
www.cloudyuseful.com
- 05-21-2005 #2Linux Guru
- Join Date
- May 2004
- Location
- forums.gentoo.org
- Posts
- 1,814
I don't know Morphix, but if you have a CD that you can use to boot to (rescue CD or Live CD), if you edit /etc/passwd to delete the password for root, it may help:
If it works like it does in Fedora, next time you login as root, you will not need to provide a password. You should then use the 'passwd' command to reset it.Code:....before.... root:x:0:0:root:/root:/bin/bash ....after.... root::0:0:root:/root:/bin/bash
/IMHO
//got nothin'
///this use to look better
- 05-21-2005 #3
Thanks for the suggestion, but I've already reinstalled the sistem. Works OK now. It is not really a loss, as I am just starting to play around with it anyway.
Stumbling around the 'net:
www.cloudyuseful.com
- 05-22-2005 #4Linux Newbie
- Join Date
- Apr 2005
- Location
- Charlottesville, VA
- Posts
- 175
You could also have added "single" to the kernel options and typed "passwd" there. I think that's even easier than booting from a livecd.
---sxeraverx---
Linux without a C Compiler is like eating Spaghetti with your mouth sewn shut. It just doesn't make sense.
- 05-23-2005 #5Linux User
- Join Date
- Oct 2004
- Location
- Serbia&Montenegro
- Posts
- 281
Or you could boot the sistem with Live CD and change the shadow file.
Linux registered user #358842
Human knowledge belongs to the world.
- 05-23-2005 #6Just Joined!
- Join Date
- May 2005
- Posts
- 5
root passwd gone - reply
dear misc
:) :) If you are using LILO then while u boot at the prompt type linux single and press enter. it will give you the # prompt . Then type passwd & enter a new password for root. It will show you all tokens successfully updated & then it will carry on with the boot.
If you are using grub then when the option to select OS appears, click on e . then select the kernel option & append single at the end of the line. & then press b to boot. It will give you the bash prompt ..Change password with passwd command , if it asks for the old password then reboot ....do the same things only at the end of the line instead of single also add init=/bin/bash & then press b. This time you can change the password with passwd command.
Then login with the new password. can also delete the user's account & create a new one.
For changing root password you need not re-install linux.
See if it works or not.


Reply With Quote