Difference between revisions of "Redhat: Modify user"
Jump to navigation
Jump to search
(Created page with "== Usermod == Once a user is created various setting may need to be updated or changed. This is done with the usermod command. <syntaxhighlight> usermod -e 2013-06-08 <username> #chang...") |
(→chage) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 23: | Line 23: | ||
== Groupmod == | == Groupmod == | ||
| + | |||
| + | The groupmod command only as two practical uses: change the group ID or change the group name. | ||
| + | |||
| + | <syntaxhighlight> | ||
| + | groupmod -g <newid> <groupname> | ||
| + | groupmod <oldname> <newname> #chnage the grouop name | ||
| + | </syntaxhighlight> | ||
== chage == | == chage == | ||
| + | |||
| + | The chage (change age) command is used to modify the age information of a password. | ||
| + | |||
| + | {| class="wikitable" | ||
| + | | -d <date> | ||
| + | | Set the last change date for the password | ||
| + | |- | ||
| + | | -E <date> | ||
| + | | assign an expiration date | ||
| + | |- | ||
| + | | -I <num> | ||
| + | | Locks account num days after password expiration | ||
| + | |- | ||
| + | | -l | ||
| + | | lists aging information | ||
| + | |- | ||
| + | | -m | ||
| + | | set minium days user must keep password | ||
| + | |- | ||
| + | | -M <num> | ||
| + | | set maximum number of days user can keep password | ||
| + | |- | ||
| + | | -W <num> | ||
| + | | specifies days before expiration that the user is warned. | ||
| + | |} | ||
Latest revision as of 15:00, 30 August 2013
Usermod
Once a user is created various setting may need to be updated or changed. This is done with the usermod command.
usermod -e 2013-06-08 <username> #change the expiration date
usermod -G <group> <username> #add user to group| -aG <group> | appends to exisiting group |
| -l <new username> | set new username |
| -L | Lock Password |
| -U | Unlock Password |
Groupmod
The groupmod command only as two practical uses: change the group ID or change the group name.
groupmod -g <newid> <groupname>
groupmod <oldname> <newname> #chnage the grouop namechage
The chage (change age) command is used to modify the age information of a password.
| -d <date> | Set the last change date for the password |
| -E <date> | assign an expiration date |
| -I <num> | Locks account num days after password expiration |
| -l | lists aging information |
| -m | set minium days user must keep password |
| -M <num> | set maximum number of days user can keep password |
| -W <num> | specifies days before expiration that the user is warned. |