I'm searching for a script that finds users who don't have a password.
Could anybody please explain me the commands that are needed in such a script?
I'm searching for a script that finds users who don't have a password.
Could anybody please explain me the commands that are needed in such a script?
Take a look at the logins command. The -p
flag displays users without passwords.
Example usage:
# logins -p
You can also parse /etc/security/passwd
and look for an empty password entry.