i

Fundamentals Of Linux

Understanding Users Security Files

UNIX and GNU Linux are a true multi user OS
When opening to work on a Linux box, it can be prevented by the number of system and user accounts may find in the /etc/passwd file. A Multi-user capability is a large asset for a system but it inevitably to be secured.  

Detect and repair security holes

Empty passwords

Empty passwords strength be the result of a successful attack and used as a backdoor. Can also be a simplex misconfiguration by the system Administrator. Let's see how to detect it :

awk -F':' '{ if ( $2 == "" ) print $1 }' /etc/shadow

How to quick fix it : Deactivate stated accounts using the CLI as root.

usermod -s /bin/false -L --expiredate 1 "$account"

UID 0 accounts

The root should have the UID 0. Another account with that UID is frequently similar to the backdoor.  

How to detect it :

awk -F':' '{ if ( $3 == "0" ) print $1 }' /etc/passwd

How to fix it : Disable account.

usermod -s /bin/false -L --expiredate 1 "$account"