Reputation: 23
I know there have been a lot of posts about this, but cannot seem to find an answer that has worked for me.
I wanted to change the password of my root user, but have failed in doing so.
logged in as root; root@ubuntu:/ passwd
passwd: Permission denied
passwd: password unchanged
root@ubuntu:/ sudo passwd root passwd: Permission denied;; passwd: password unchanged;;
this is a ubuntu 10.04 system and i dont know how can i solve this. I have tried changing the PAM files as well as login.defs file,but to no avail. can anyone help me?
Upvotes: 1
Views: 2049
Reputation: 454
Make sure your /etc/pam.d/common-password looks like this
# here are the per-package modules (the "Primary" block)
password [success=1 default=ignore] pam_unix.so obscure sha512
# here's the fallback if no module succeeds
password requisite pam_deny.so
# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
password required pam_permit.so
# and here are more per-package modules (the "Additional" block)
# end of pam-auth-update config
Upvotes: 0
Reputation: 589
sudo passwd root
Now u see it asking for the new password for root. So reset it and Enjoy :)
$su root
Give the new password that you have entered
Upvotes: 1
Reputation: 84
Enter recovery mode through grub and choose to enter a root shell. From there:
passwd <user>
No unmounting of the drive is required.
Upvotes: 0