LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   forgot system password (https://www.linuxquestions.org/questions/linux-newbie-8/forgot-system-password-4175450476/)

thirstonlinux 02-16-2013 07:21 PM

forgot system password
 
Hi All,

I forgot the system password and root password for my RHEL6 login.

I tried to enter in the singleuser mode and change it. When I get into the single usermode, it directly logged me in as root@localhost#.

After I enter the passwd command nothing happens.
When I do echo $? it returns the value 1

Help me to change my root and system password

SalmonEater 02-16-2013 07:33 PM

http://www.linuxquestions.org/questi...ssword-158800/

joecam1673 02-16-2013 08:01 PM

If passwd is choking it's kind of hard to guess why since it could be any number of reasons. I can recommend the first things I would check in your situation though;

Is etc and/or (s)bin mounted rw?
Anything in the logs?

Those two would probably sort this out pretty quickly I think. If not running "set -vx" and then running passwd might give you some more info on what exactly is failing. If you're still unable to get it and you've got strace installed that would be where I could look next "strace passwd".

Hope some of that helps.

thirstonlinux 02-17-2013 06:40 PM

"passwd -d root" deleted the root passwd and was able to reset it later.


All times are GMT -5. The time now is 01:41 PM.