/etc/shadow, I have a line that begins:
Why is there a
! before the
$6$ in the hash?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
It means that the password is locked. Tools, such as
usermod -L add a
! to the password to invalidate it.
usermod -U removes the
man 5 shadow
If the password field contains some string that is not a valid result of crypt(3), for instance ! or *, the user will not be able to use a unix password to log in (but the user may log in the system by other means).