From 43546b790169b1979724540840b3db109a09cf81 Mon Sep 17 00:00:00 2001 From: litianci Date: Sun, 2 Oct 2022 23:20:50 +0800 Subject: [PATCH 1/4] Change the option description of the userdel command --- docs/books/admin_guide/06-users.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/books/admin_guide/06-users.md b/docs/books/admin_guide/06-users.md index 60eab35212..0cd6c21668 100644 --- a/docs/books/admin_guide/06-users.md +++ b/docs/books/admin_guide/06-users.md @@ -450,7 +450,7 @@ $ sudo userdel -r carine | Option | Description | | -------| --------------------------------------------------------- | -| `-r` | Deletes the connection directory and the contained files. | +| `-r` | Delete the user's home directory and mail files located in the `/var/spool/mail/` directory | !!! Tip From 07c21765c193bd6fa1cccf0f6c1365359cfe4220 Mon Sep 17 00:00:00 2001 From: litianci Date: Sun, 2 Oct 2022 23:55:42 +0800 Subject: [PATCH 2/4] Corresponding to the previous information --- docs/books/admin_guide/06-users.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/books/admin_guide/06-users.md b/docs/books/admin_guide/06-users.md index 0cd6c21668..f95edb75e3 100644 --- a/docs/books/admin_guide/06-users.md +++ b/docs/books/admin_guide/06-users.md @@ -468,13 +468,13 @@ root:x:0:0:root:/root:/bin/bash (1)(2)(3)(4)(5) (6) (7) ``` -* 1: Login. -* 2: Password (`x` if defined in `/etc/shadow`). -* 3: UID. -* 4: GID of the primary group. -* 5: Comment. -* 6: Home directory. -* 7: Shell. +* 1: Login name; +* 2: Password identification, `x` indicates that the user has a password; +* 3: UID; +* 4: GID of the primary group; +* 5: Comments; +* 6: Home directory; +* 7: Shell (`/bin/bash`, `/bin/nologin`, ...). ### `/etc/shadow` file From a00c684246e07d17cc42812cece77a93903c71fa Mon Sep 17 00:00:00 2001 From: litianci Date: Mon, 3 Oct 2022 11:45:22 +0800 Subject: [PATCH 3/4] update --- docs/books/admin_guide/06-users.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/books/admin_guide/06-users.md b/docs/books/admin_guide/06-users.md index f95edb75e3..20db69d1fe 100644 --- a/docs/books/admin_guide/06-users.md +++ b/docs/books/admin_guide/06-users.md @@ -248,7 +248,7 @@ Thus no user can use the password to access the group (since group members do no A user is defined as follows in the `/etc/passwd` file: * 1: Login name; -* 2: Password identification, `x` indicates that the user has a password; +* 2: Password identification, `x` indicates that the user has a password, the encrypted password is stored in the second field of `/etc/shadow`; * 3: UID; * 4: GID of the primary group; * 5: Comments; @@ -456,7 +456,7 @@ $ sudo userdel -r carine To be deleted, a user must be logged out and have no running processes. -`userdel` removes the user's line from the `/etc/passwd` and `/etc/gshadow` files. +The `usedel` command removes the corresponding lines in `/etc/passwd`, `/ etc/shadow`, `/etc/group`, `/etc/gshadow`. As mentioned above, `userdel -r` will also delete the corresponding primary group of the user. ### `/etc/passwd` file @@ -469,7 +469,7 @@ root:x:0:0:root:/root:/bin/bash ``` * 1: Login name; -* 2: Password identification, `x` indicates that the user has a password; +* 2: Password identification, `x` indicates that the user has a password, the encrypted password is stored in the second field of `/etc/shadow`; * 3: UID; * 4: GID of the primary group; * 5: Comments; From 54592b4125d38d9962a0aff45270722413236ba7 Mon Sep 17 00:00:00 2001 From: litianci Date: Mon, 3 Oct 2022 11:49:02 +0800 Subject: [PATCH 4/4] Supplement the missing letter r --- docs/books/admin_guide/06-users.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/books/admin_guide/06-users.md b/docs/books/admin_guide/06-users.md index 20db69d1fe..254efa27e8 100644 --- a/docs/books/admin_guide/06-users.md +++ b/docs/books/admin_guide/06-users.md @@ -456,7 +456,7 @@ $ sudo userdel -r carine To be deleted, a user must be logged out and have no running processes. -The `usedel` command removes the corresponding lines in `/etc/passwd`, `/ etc/shadow`, `/etc/group`, `/etc/gshadow`. As mentioned above, `userdel -r` will also delete the corresponding primary group of the user. +The `userdel` command removes the corresponding lines in `/etc/passwd`, `/ etc/shadow`, `/etc/group`, `/etc/gshadow`. As mentioned above, `userdel -r` will also delete the corresponding primary group of the user. ### `/etc/passwd` file