From 7dcdcea28c3c47f411c9611ee1827f8dc83ad938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Soszy=C5=84ski?= Date: Sun, 7 Feb 2021 20:05:03 +0100 Subject: [PATCH] deluser, userdel: add page (#5245) --- pages/common/deluser.md | 15 --------------- pages/linux/deluser.md | 21 +++++++++++++++++++++ pages/linux/userdel.md | 20 +++++++++++++++++--- 3 files changed, 38 insertions(+), 18 deletions(-) delete mode 100644 pages/common/deluser.md create mode 100644 pages/linux/deluser.md diff --git a/pages/common/deluser.md b/pages/common/deluser.md deleted file mode 100644 index c9d67235f..000000000 --- a/pages/common/deluser.md +++ /dev/null @@ -1,15 +0,0 @@ -# deluser - -> Remove a user account or remove a user from a group. - -- Remove a user: - -`deluser {{name}}` - -- Remove a user along with their home directory and mail spool: - -`deluser -r {{name}}` - -- Remove a user from a group: - -`deluser {{name}} {{group}}` diff --git a/pages/linux/deluser.md b/pages/linux/deluser.md new file mode 100644 index 000000000..61f7fb923 --- /dev/null +++ b/pages/linux/deluser.md @@ -0,0 +1,21 @@ +# deluser + +> Delete a user from the system. +> Note: all commands must be executed as root. +> More information: . + +- Remove a user: + +`deluser {{username}}` + +- Remove a user and their home directory: + +`deluser --remove-home {{username}}` + +- Remove a user and their home, but backup their files into a `.tar.gz` file in the specified directory: + +`deluser --backup-to {{path/to/backup_directory}} --remove-home {{username}}` + +- Remove a user, and all files owned by them: + +`deluser --remove-all-files {{username}}` diff --git a/pages/linux/userdel.md b/pages/linux/userdel.md index ee7a9a3cf..d9e1e6f73 100644 --- a/pages/linux/userdel.md +++ b/pages/linux/userdel.md @@ -1,7 +1,21 @@ # userdel -> Remove a user. +> Remove a user account or remove a user from a group. +> Note: all commands must be executed as root. +> More information: . -- Remove a user and their home directory: +- Remove a user: -`userdel -r {{name}}` +`userdel {{name}}` + +- Remove a user along with their home directory and mail spool: + +`userdel --remove {{name}}` + +- Remove a user from a group: + +`userdel {{name}} {{group}}` + +- Remove a user in other root directory: + +`userdel --root {{path/to/other/root}} {{name}}`