After doing some googling I could not find why in the /etc/passwdshows a ! at the beginning of the line.It looks like this:!user:x:0:0:user:/home/user:/bin/bashany ideas? my only guess is that perhaps the user no longer exist.
What does it mean a ! before the username field in /etc/passwd?
linux;rhel;users;password
This essentially does nothing more than changing the username to !user, so if you try to login as user you will get:No passwd entry for user 'user'as the username has been changed to !user.Now if you change the /etc/shadow too and set the username as !user, then you can login as the user !user using the same password used for user.If you want to block a user from logging in using password, you should add a ! to the password field of /etc/shadow or better use passwd -l command.