Hi,
I ve forgotten my root passwd on centos 6,
I tried to change it as I used in debian (in debian it works perfectly) , that is:
use a cd live (or installation cd1), to access the hd,
I mount my root partition and mount proc and devices
I tried the command passwd, no error reprorted, but after reboot the passwd had´t changed.
then I decided to remove passwd from /etc/shadow (delete the
second field).
OK, now I can access my machine without passwd, BUT I CAN´T GIVE ANY PASSWORD!!!! I RECEIVE THIS ERROR
# passwd
Changing password for user root.
New password:
Retype new password:
passwd: Authentication token manipulation error
any idea to fix the problem.
how to change root passwd (if forgotten)
-
- Posts: 184
- Joined: 2009/01/30 19:58:25
- Location: California
Re: how to change root passwd (if forgotten)
Boot into Single User Mode. This bypasses login and goes directly to a root prompt. Then use the passwd command to change the root password. However I'm not sure if this will work correctly after you changed your /etc/shadow file.
how to change root passwd (if forgotten)
If single user mode does not work
Boot with live cd and fix you shadow file (copy known password hash)
Boot with live cd and fix you shadow file (copy known password hash)
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Re: how to change root passwd (if forgotten)
See [url=http://wiki.centos.org/TipsAndTricks/ResetRootPassword]TipsAndTricks/ResetRootPassword[/url] and in particular the CentOS-6 note at the end.