root's password can be changed without entering the old password? Is there any benefit to this or is it just an implementation fault? If we issue
passwd from a normal user account it first asks for " (Current) Unix Password: " but in the case of
root it takes us directly to " Enter new Unix password: ". I don't understand the logic behind this.
The purpose of
- asking user, old password before changing
You may have left you keyboard/connection connected with you session open. I might want to change your password. As a (little) security check, old password is asked, so system know rightfull user change password.
- root not being asked for other user password
You might have forger your password, a human being with admin right change it back to you. Root can edit /etc/passwd /etc/shadow, so to avoid messing up those files, root can change without check.