- Linux Training
- Desktop Tutorials
- Server Tutorials
|Linux Commands - Manage Users and Groups|
Groups Every user will be created and added to a group. Groups are a effective method of managing users with similar needs. The command to create a group is groupadd. There are a number of options that can be used with the groupadd command. If you wanted to add a new group called sales you would use the following command:
-g gid group number, 0-499 are usually for system accounts
-r the group added will be a system account
-f this option will not allow you to exit if a group with the same name exists
-o this will allow you to use an existing gid if used with the
-g option -help group Files When a group is created, or another user is added to a group, several files will be changed.
/etc/group - contains group information /etc/gshadow - contains the secure account information
groupmod -n technology tech
Options for root Only
Some password management is done to encourage good passwords, see the example.
As root the superuser may change any user by using the passwd command and then entering the username. The example shows the changing of the password for joe.
chage -l joe
The next example shows changing joe's password expiration date and then the out put of listing his settings after it was changed. Note that it shows the date it was changed on.