The passwd command installs or changes the password associated with the login name . If name is omitted, it defaults to the invoking user's login name. You can use the -F option to choose an alternate password file. You must have read and write permission for the alternate file.
Ordinary users can change only the password corresponding to their own login name .
If there is an old password, passwd prompts for it. Then it prompts for the new password twice. When the new password is entered a second time, the two copies of the new password are compared. If the two copies differ, passwd repeats the cycle of prompting for the new password, at most twice. Only the first eight characters are significant in an untrusted system.