Results 1 to 8 of 8
Enjoy an ad free experience by logging in. Not a member yet? Register.
i am root, how can i see a user`s password?
i don't think you can!
You shouldn't be able to see it, but you can reset it. The only way to see it would be to extract the password hash and brute force it with something like john the ripper. It's a lot of trouble to go to - the idea of encrypting the password is so no one can see including root.
define the user and all the required option for it ( groups, login shell ) then change it's password using passwd (user_name), i think the option -p password will not work!
#useradd -m -s /bin/bash username #passwd -f username
- Join Date
- May 2011
adduser with option -p
Your password is always encrypted before it is saved.
When you login, the password you type will also be encrypted and compared with the password in /etc/shadow.
So when you use:
sudo adduser USERNAME -p PASSWORD
Therefore, you will (almost) never can login with your password as it will be ENCRYPTED and compared with your PLAIN password.
And here is the solution
pass=$(mkpasswd -m SHA-512 YOURPASS) // Assign encrypted password to variable $pass sudo adduser USERNAME -p $pass