As changing another user's password is an administrative task it should be done from a user with administrator permissions. Any such administrator has access to sudo
and will then be able to change another user's password with the following command:
sudo passwd USERNAME
You will be asked for your sudo password first, then you will have to enter the new password for the given user USERNAME twice.
From the security point of view it does not make much sense to let non admintrator users change the passwords of all users. This would be a perfect way to gain administrator access (or to accidentally lock the administrator out).
Therefore all users you need to be able to change the password of other users should have an administrator account (and be taught about the responsibility that comes with this).
which
. So, on my machine (and probably yours to, but you should probably check),which passwd
returns/usr/bin/passwd
. With that said, what you are trying to do is a HUGE security risk, and I would not recommend it.sudo adduser user sudo
should do it replacing user with the user name of the user you want to be an administrator. Anything else makes no sense and would be a security risk.