2014-03-23 23:45:45 +00:00
|
|
|
# useradd
|
|
|
|
|
|
|
|
> Create a new user
|
|
|
|
|
|
|
|
- Create new user
|
|
|
|
|
2014-08-18 07:22:39 +01:00
|
|
|
`useradd {{name}}`
|
2014-03-23 23:45:45 +00:00
|
|
|
|
|
|
|
- Create new user with a default home directory
|
|
|
|
|
2014-08-18 07:22:39 +01:00
|
|
|
`useradd -m {{name}}`
|
2014-03-23 23:45:45 +00:00
|
|
|
|
|
|
|
- Create new user with specified shell
|
|
|
|
|
2014-08-18 07:22:39 +01:00
|
|
|
`useradd -s {{/path/to/shell}} {{name}}`
|
2014-03-23 23:45:45 +00:00
|
|
|
|
|
|
|
- Create new user with supplementary groups (mind the lack of whitespace)
|
|
|
|
|
2014-08-18 07:22:39 +01:00
|
|
|
`useradd -G {{group1,group2}} {{name}}`
|