Linux chage command The chage command is used to set account expiration date for user. It also changes the time the user’s password will expire. Syntax: $ chage [options] LOGIN Examples:- #1 – Set Password Expiry Days of User Set the number of days to expire password after last change. It means the user will force to change its password after 15 days of last change. $ chage -M 15 testuser #2 – Set Account Password Expiry Warning Date You can also set the password expiry warning date. So that…
Read MoreTag: user
Linux – usermod
Modify User in Linux Use usermod command to modify/update existing user account in Linux. Syntax: $ usermod [options] USER_NAME Example: Change the default shell of user myuser to /usr/sbin/nologin. Use -s or –shell to update default shell. $ usermod –shell “/usr/sbin/nologin” myuser Change Home Directory Use -d or –home switch to change the current home directory of user. The new directory will create automatically, but the parent directory of new home must be exist. $ usermod –home “/var/home/myuser” myuser You can also use -m or –move-home with above switch to…
Read More