Chapter 32. Users and Groups
32.2. User and Group Management Tools
Managing users and groups can be a tedious task; this is why Red Hat Enterprise Linux provides tools
and conventions to make them easier to manage.
The easiest way to manage users and groups is through the graphical application, User Manager
(system-config-users). For more information on User Manager, refer to
Group
Configuration".
The following command line tools can also be used to manage users and groups:
• useradd, usermod, and userdel — Industry-standard methods of adding, deleting and modifying
user accounts
• groupadd, groupmod, and groupdel — Industry-standard methods of adding, deleting, and
modifying user groups
• gpasswd — Industry-standard method of administering the /etc/group file
• pwck, grpck — Tools used for the verification of the password, group, and associated shadow files
• pwconv, pwunconv — Tools used for the conversion of passwords to shadow passwords and back
to standard passwords
32.2.1. Command Line Configuration
If you prefer command line tools or do not have the X Window System installed, use this section to
configure users and groups.
32.2.2. Adding a User
To add a user to the system:
1. Issue the useradd command to create a locked user account:
useradd <username>
2. Unlock the account by issuing the passwd command to assign a password and set password
aging guidelines:
passwd <username>
Command line options for useradd are detailed in
Option
-c '<comment>'
-d <home-dir>
-e <date>
-f <days>
296
Table 32.1, "useradd Command Line
Description
<comment> can be replaced with any string. This option is generally
used to specify the full name of a user.
Home directory to be used instead of default /home/<username>/
Date for the account to be disabled in the format YYYY-MM-DD
Number of days after the password expires until the account is
disabled. If 0 is specified, the account is disabled immediately after
Section 32.1, "User and
Options".
Need help?
Do you have a question about the ENTERPRISE LINUX 4 and is the answer not in the manual?
Questions and answers