3.3. User and Group Management Tools
source
3.3. User and Group Management Tools
Managing users and groups can be tiresome; this is why Fedora provides tools and conventions to make this task easier to manage.
The easiest way to manage users and groups is through the graphical application, User Manager( ). For more information on User Manager, refer to Section 3.2, “User Manager Tool”.
The following command line tools can also be used to manage users and groups:
3.3.1. Command Line Configuration
If you prefer command line tools or do not have the X Window System installed, use following to configure users and groups.
Adding a User
To add a user to the system:
- Issue thecommand to create a locked user account:
Command line options forTable 3.1, “. Command Line Options”
are detailed in Table 3.1.
Command Line OptionsOPTION | DESCRIPTION |
---|---|
‘ ‘ | 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 | .|
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 | is specified, the account is disabled immediately after the password expires. If is specified, the account is not be disabled after the password expires.|
Group name or group number for the user’s default group. The group must exist prior to being specified here. | |
List of additional (other than default) group names or group numbers, separated by commas, of which the user is a member. The groups must exist prior to being specified here. | |
Create the home directory if it does not exist. | |
Do not create the home directory. | |
Do not create a user private group for the user. | |
The password encrypted with | .|
Create a system account with a UID less than 500 and without a home directory. | |
User’s login shell, which defaults to | .|
User ID for the user, which must be unique and greater than 499. |
Adding a Group
To add a group to the system, use the command
:
Command line options forTable 3.2, “. Command Line Options”
are detailed in Table 3.2.
Command Line OptionsOPTION | DESCRIPTION |
---|---|
, | When used with | and already exists, will choose another unique for the group.
Group ID for the group, which must be unique and greater than 499. | |
, = | Override | defaults.
, | Allow to create groups with duplicate. |
, | Use this encrypted password for the new group. |
Create a system group with a GID less than 500. |
Password Aging
For security reasons, it is advisable to require users to change their passwords periodically. This can be done when adding or editing a user on the Password Info tab of the User Manager.
To configure password expiration for a user from a shell prompt, use theTable 3.3, “, followed by the username. Command Line Options”
command with an option fromShadow passwords must be enabled to use chage
Shadow passwords must be enabled to use theSection 3.7, “Shadow Passwords”.
command. For more information, see Table 3.3.
Command Line OptionsOPTION | DESCRIPTION |
---|---|
Specifies the number of days since January 1, 1970 the password was changed. | |
Specifies the date on which the account is locked, in the format YYYY-MM-DD. Instead of the date, the number of days since January 1, 1970 can also be used. | |
Specifies the number of inactive days after the password expiration before locking the account. If the value is | , the account is not locked after the password expires.|
Lists current account aging settings. | |
Specify the minimum number of days after which the user must change passwords. If the value is | , the password does not expire.|
Specify the maximum number of days for which the password is valid. When the number of days specified by this option plus the number of days specified with the | option is less than the current day, the user must change passwords before using the account.|
Specifies the number of days before the password expiration date to warn the user. |
chage interactivity
If the
command is followed directly by a username (with no options), it displays the current password aging values and allows them to be changed interactively.
You can configure a password to expire the first time a user logs in. This forces users to change passwords immediately.
- Set up an initial password — There are two common approaches to this step: the administrator can assign a default password, or he can use a null password.To assign a default password, type the following at a shell prompt:To assign a null password instead, use the following command:
Avoid using null passwords whenever possible
Using a null password, while convenient, is a highly insecure practice, as any third party can log in first and access the system using the insecure username. Always make sure that the user is ready to log in before unlocking an account with a null password. - Force immediate password expiration — Type the following command:This command sets the value for the date the password was last changed to the epoch (January 1, 1970). This value forces immediate password expiration no matter what password aging policy, if any, is in place.
Upon the initial log in, the user is now prompted for a new password.
3.3. User and Group Management Tools
3.3. User and Group Management Tools
comment 0 Comments
more_vert