Difference between revisions of "Redhat: Create user command line"
Jump to navigation
Jump to search
(Blanked the page) |
|||
| Line 1: | Line 1: | ||
| + | == Command Line User and Group Creation == | ||
| + | There are a number of commands that can automate the process of creating a User and / or Group. This will complete all of the needed steps for you. | ||
| + | |||
| + | == Useradd == | ||
| + | |||
| + | The Useradd command creates a user accoding the the options and values given to it. The modt basic usage create a user with the next available UID and an equivalent private group. | ||
| + | |||
| + | <syntaxhighlight> | ||
| + | Useradd <username> | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | {| class="wikitable" | ||
| + | |+ UserAdd Options | ||
| + | | -u <UID> | ||
| + | | overrides the default UID | ||
| + | |- | ||
| + | | -g <GID> | ||
| + | | Overrides the Default GID | ||
| + | |- | ||
| + | | -c info | ||
| + | | Comments on the user | ||
| + | |- | ||
| + | | -d <home _dir> | ||
| + | | Overrides teh default Home directory | ||
| + | |- | ||
| + | | -e <date> | ||
| + | | expriation date for the account | ||
| + | |- | ||
| + | | -f <num> | ||
| + | | number of days after password expiration when account is disabled | ||
| + | |- | ||
| + | | -G <group> | ||
| + | | groups the user is a member of | ||
| + | |- | ||
| + | | -s <shell> | ||
| + | | Overrides the default shell | ||
| + | |- | ||
| + | |||
| + | |} | ||
| + | |||
| + | |||
| + | == Groupadd == | ||
| + | |||
| + | == Passwd == | ||
| + | |||
| + | == Userdel == | ||
| + | |||
| + | == Groupdel == | ||
Revision as of 14:27, 30 August 2013
Command Line User and Group Creation
There are a number of commands that can automate the process of creating a User and / or Group. This will complete all of the needed steps for you.
Useradd
The Useradd command creates a user accoding the the options and values given to it. The modt basic usage create a user with the next available UID and an equivalent private group.
Useradd <username>| -u <UID> | overrides the default UID |
| -g <GID> | Overrides the Default GID |
| -c info | Comments on the user |
| -d <home _dir> | Overrides teh default Home directory |
| -e <date> | expriation date for the account |
| -f <num> | number of days after password expiration when account is disabled |
| -G <group> | groups the user is a member of |
| -s <shell> | Overrides the default shell |