Linux can use different authentication mechanisms, most notably PAM. The most common modules are pam_unix.so or pam_unix2.so, located in /usr/lib/x86_x64-linux-gnu/security/. They manage user information, authentication, sessions, and current and previous passwords.
When changing a password with passwd, PAM is invoked and updates /etc/passwd, /etc/shadow, etc.
/etc/passwd
It contains information about each user on the system (readable by everyone). Each line describes a user with 7 fields separated by : — login name, password info, UID, GUID, full name, home directory, shell.
Removing the root Password
txt
# Antes
root:x:0:0:root:/root:/bin/bash
# Después
root::0:0:root:/root:/bin/bash
This would leave root without a password. This situation is uncommon, but administrators sometimes grant excessive permissions on /etc.