tldr/pages/linux/usermod.md

16 lines
315 B
Markdown
Raw Normal View History

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