2014-03-24 10:31:06 +00:00
|
|
|
# usermod
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
> Modifies a user account.
|
2014-03-24 10:31:06 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Change a user's name:
|
2014-03-24 10:31:06 +00:00
|
|
|
|
|
|
|
`usermod -l {{newname}} {{user}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Add user to supplementary groups (mind the whitespace):
|
2014-03-24 10:31:06 +00:00
|
|
|
|
|
|
|
`usermod -a -G {{group1,group2}} {{user}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Create a new home directory for a user and move their files to it:
|
2014-03-24 10:31:06 +00:00
|
|
|
|
2015-10-28 08:33:06 +00:00
|
|
|
`usermod -m -d {{/path/to/home}} {{user}}`
|