0% found this document useful (0 votes)
29 views2 pages

Managing User Accounts:: Written by Razib Shahriar Rubence

This document discusses managing user accounts and password aging policies on Linux systems. It provides commands for adding, deleting, and modifying users as well as changing password settings. As an example, it shows how to set a password aging policy for the user "jack" to expire the account on December 31, 2011, require a password change within 30 days of the last change, and inactive the account for 7 days if not changed within 30 days.

Uploaded by

Anoop
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views2 pages

Managing User Accounts:: Written by Razib Shahriar Rubence

This document discusses managing user accounts and password aging policies on Linux systems. It provides commands for adding, deleting, and modifying users as well as changing password settings. As an example, it shows how to set a password aging policy for the user "jack" to expire the account on December 31, 2011, require a password change within 30 days of the last change, and inactive the account for 7 days if not changed within 30 days.

Uploaded by

Anoop
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

RH135-Day15

Written by Razib Shahriar Rubence

Managing User Accounts:

local users information are stored in a simple file /etc/passwd. Students are advised to follow
page 107 and 108 for detail.

Command to manage users:

# useradd username   <-- to add users


# passwd username    <-- to change the password of user
# userdel -rf username   <-- to delete user with recursively removing their home and mail
directory
# id username          <-- Shows user's id

# usermod is used to modify user's information. Some important uses of usermod is as follows:

# usermod -D directoryname username  <-- change user's home directory


# usermod -S filename username   <--- change user's login shell
# usermod -G Groupname  username     <-- assign Groupname as supplementary Group of the
user
# usermod -L username    <--- Locking user account
# usermod -U username    <--- To unlock user account

Managing Password:

Password Aging Policies

By default passwords do not expires. To modify password aging for existing users, use the
chage command

# chage [options] username

-m       minimum days between password changes from last change date
-M       Maximum days between password changes from last change date
-I       Number of days inactive since password expired before locking account
-E Date  expire the account on this date (YYYY-MM-DD format)
-W       Number of days before a required change to start warnings
-l       List of settings
-d       Force users to change their password when first loging

LAB Practice:

For the user jack implement the following password aging policy:

1/2
RH135-Day15

Written by Razib Shahriar Rubence

01. Account will be expired on Dec 31st, 2011


02. Password must be changed within 30 days of last password change
03. If password doesn't change within 30days of last password change, the account will be
inactive for next 7 days.

# change -E 2011-12-31 -M 30 -I 7 jack

# chage -l jack

2/2

You might also like