From 49327963e20736bdd80df68888168137b351f714 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sat, 10 Sep 2016 10:45:36 +0100 Subject: [PATCH 1/3] Add command to create a system user to useradd. Creating a new system user is common administrative task on the average linux server. Adding the appropriate command to tldr-pages will be rather useful, since it isn't something you do every day and is easy to forget. --- pages/linux/useradd.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/linux/useradd.md b/pages/linux/useradd.md index 4514cff7a..1d69611e5 100644 --- a/pages/linux/useradd.md +++ b/pages/linux/useradd.md @@ -17,3 +17,7 @@ - Create new user with supplementary groups (mind the lack of whitespace): `useradd -G {{group1,group2}} {{name}}` + +- Create new system user without a home directory: + +`useradd --no-create-home --system {{name}}` From b36b02692f66fb8a885886646b53319593c56ba1 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sat, 10 Sep 2016 19:34:16 +0100 Subject: [PATCH 2/3] Reworded other example to aid simplicity. --- pages/linux/useradd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/linux/useradd.md b/pages/linux/useradd.md index 1d69611e5..b631cf2a4 100644 --- a/pages/linux/useradd.md +++ b/pages/linux/useradd.md @@ -14,7 +14,7 @@ `useradd -s {{/path/to/shell}} {{name}}` -- Create new user with supplementary groups (mind the lack of whitespace): +- Create new user belonging to additional groups (mind the lack of whitespace): `useradd -G {{group1,group2}} {{name}}` From a9fea19ec4c19595f227399a866a6e40fe31a97f Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sat, 10 Sep 2016 19:35:35 +0100 Subject: [PATCH 3/3] Converted all arguments to the long form --- pages/linux/useradd.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/linux/useradd.md b/pages/linux/useradd.md index b631cf2a4..5e7690ebf 100644 --- a/pages/linux/useradd.md +++ b/pages/linux/useradd.md @@ -8,15 +8,15 @@ - Create new user with a default home directory: -`useradd -m {{name}}` +`useradd --create-home {{name}}` - Create new user with specified shell: -`useradd -s {{/path/to/shell}} {{name}}` +`useradd --shell {{/path/to/shell}} {{name}}` - Create new user belonging to additional groups (mind the lack of whitespace): -`useradd -G {{group1,group2}} {{name}}` +`useradd --groups {{group1,group2}} {{name}}` - Create new system user without a home directory: