Temporarily disabling users in linux 1. find the row in the/etc/passwd file where the disabled user is located, and add #/etc/passwd # coderbolg: x: 500: 500:/home/coderbolg: At the beginning of the row: /bin/bash2. find the row where the disabled user is located in the/etc/shadow file and add it before the Second Field (password encryption field! Or */etc/shadow
Temporarily disabling users in linux
1. find the row where the disabled user is located in the/etc/passwd file and add it at the beginning of the row #
/Etc/passwd
# Coderbolg: x: 500: 500:/home/coderbolg:/bin/bash
2. find the row where the disabled user is located in the/etc/shadow file and add it before the Second Field (password encryption field! Or *
The/etc/shadow file is generally read-only and is not recommended to be modified.
Coderbolg: * $1 $ HsYY3Xxn $ iDxguvDB8vsSeM3VjxKbq/: 14817: 0: 99999: 7 :::
3. lock account newuser1
# Usermod-L newuser1
4. unlock newuser1
# Usermod-U newuser1