I wanted to know what happens when i run passwd command with sudo. I get a prompt to enter new UNIX password? Which user password is being changed here?
1 Answer
sudo will cause the console authenticate yourself with your current user. Once done, passwd command will be issued, so once you successfully authenticated, root's password is the one being changed.
If you just run passwd without sudo, the current user's password is being changed.