I am using Linux 6. I have forgotten the root password. I tried to recover it through the following steps:
1) Rebooted the system.
2) After this I have pressed e
3) Selected the kernel option and again pressed e
4) Later, at the end of the line, I gave one space and typed 1 and pressed enter key.
5) Now pressed b.
After completion of the above steps I received this error:
Telling INIT to single user mode.
init:rc main process (905)killed by TERM signal.
[root@bel/]#
……Please help me…..
If you are on # prompt then generate new encrypted password put it in one txt file then open /etc/shadow file and replace you new encrypted password in place of root's password. google it if you don't know which command you need to use to get encrypted password
What you are doing is getting you most of the way there. It is ending with you sitting at a shell prompt logged in as the root user. Now all you need to do is issue the 'passwd' command to change the password for the root user to something you will remember.
Bruce nails it again; do that and you should be good. One question, though: what is Linux 6? Do you mean Linux Mint? Not important, just curious.
I was curious about the Linux 6 aspect as well, but as it was irrelevant to the solution, I decided not to ask. Mint is up to 15 now, so I figured it wasn't that. Could be Debian even though it is up to 7.1. Other than those, I suppose it could be RH or CentOS.
I tried with the command PASSWD but it isn't prompting to set the new password..What could be the reason..
Is it displaying anything at all? BTW, passwd and PASSWD are not equivalent, so if you used all caps for the command, it should have given you the following: "PASSWD: command not found".
Yes sir i tried with passwd only,for that i am getting like this
[root@bel/]#
I have never seen a case where that didn't work, so I will need to try to replicate it here. What kernel are you using (use 'uname -r' to find out) and what Linux distribution and release/version?
have you tried echo $PATH
try this
http://unix.stackexchange.com/questions/35929/how-can-we-change-root-password
5.Add the word ‘single’ at the end.
How to Reset forgotten Root passwords
http://linuxgazette.net/107/tomar.html