I accidentally enabled(set) my root password (by default it is locked), and now I want to "undo" it.
I used both commands
sudo usermod -p '!' root
and
sudo passwd -dl root
in that order.
How do I check if root's account is locked?
permissionsrootsudo
I accidentally enabled(set) my root password (by default it is locked), and now I want to "undo" it.
I used both commands
sudo usermod -p '!' root
and
sudo passwd -dl root
in that order.
How do I check if root's account is locked?
Best Answer
You can use the
passwd
command:From
man 1 passwd
:The data shown is stored in
/etc/shadow
, the file which holds the encrypted passwords.For example, after each of the above
passwd
commands, the states were: