JRehkemper.de

Set User Password

You own Password

You can change you own password with passwd. You will need to enter you current password, before you can set a new one.

[tux@server]$ passwd

Password of another User

Root can reset other users passwords. You will not be asked for the current password and can set a new one.

[tux@server]$ passwd <username>

Force User to reset Password on Login

You can use the chage command to force a user to reset their password. Normally chage set the expiration date of the users password, but if you set it to 0 the use has to change it immediately.

[tux@server]$ chage -d 0 <username>

Show Expiration Date of User and Password

To see when a user or password expires you can use chage with the -l flag.

[tux@server]$ chage -l <username>
Last password change                                    : May 30, 2022
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 0
Maximum number of days between password change          : 99999
Number of days of warning before password expires       : 7
profile picture of the author

Jannik Rehkemper

I'm an professional Linux Administrator and Hobby Programmer. My training as an IT-Professional started in 2019 and ended in 2022. Since 2023 I'm working as an Linux Administrator.