Configure Linux User Password

We can use the passwd command to set the password for newly created account or we can reset the password for existing login.

Syntax:

passwd [-k] [-l] [-u [-f]] [-d] [-e] [-n mindays] [-x maxdays] [-w warndays] [-i inactivedays] [-S] [–stdin] [username]

Example:

passwd k2admin1

Configure Linux User Password

Option Description
k keep non-expired authentication tokens
d delete the password for the named account (root only)
l lock the password for the named account (root only)
u unlock the password for the named account (root only)
e expire the password for the named account (root only)
f force operation
x maximum password lifetime (root only)
n minimum password lifetime (root only)
w number of days warning users receives before password expiration (root only)
i number of days after password expiration when an
account becomes disabled (root only)
S report password status on the named account
Powered by k2schools
Skip to toolbar