After doing some googling I could not find why in the /etc/passwd
shows a !
at the beginning of the line.
It looks like this:
!user:x:0:0:user:/home/user:/bin/bash
any ideas? my only guess is that perhaps the user no longer exist.
linuxpasswordrhelusers
After doing some googling I could not find why in the /etc/passwd
shows a !
at the beginning of the line.
It looks like this:
!user:x:0:0:user:/home/user:/bin/bash
any ideas? my only guess is that perhaps the user no longer exist.
Best Answer
This essentially does nothing more than changing the username to
!user
, so if you try to login asuser
you will get: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 foruser
.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 usepasswd -l
command.