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