+3 votes
65 views
in Linux by (242k points)
reopened
Change Linux password - this is how it works

1 Answer

+4 votes
by (1.6m points)
 
Best answer

Change your own password
Change the password for another user

Changing Linux passwords works via the easy-to-use passwd command. You can find out how to use this here..

image image

Of course, Linux offers you the option of protecting all user accounts with passwords. These can of course be changed by the users at any time. We'll show you how it works below.

Change your own password

Changing your password on Linux is a straightforward process. We use the passwd command for this. To change your password, enter passwd in the console. You may be asked to enter your old password. Then you have to enter your new password and confirm it. We explain here how to find a password that is as secure as possible. From now on you will be asked for your new password the next time you try to log in.

image

Change the password for another user

If you want to change the password of another user, you need root rights . So if you are asked for your password during the procedure, enter it in the terminal in order to gain root rights. Enter sudo passwd <user name> in the terminal, and you can set the password of the specified user. After the next logout, the user must enter his new password. Sometimes it is helpful to force the affected user to log out after a password change . You can do this with the command sudo pkill -KILL -u <user name> ..

image

...