What is meant by an unset password? Is it blank? Is it null? Or something else more cryptic?
Is just inexistent. Root account is disabled by default, hence it doesn't need password. So, what most resemblance has is undefined
(in JavaScript) or (null)
(other languages). It is just unset.
How does the account becomes enabled once I set password for it?
Actually, setting the password is just part of it, but doesn't enable the account. You need to enable the account using:
sudo usermod -U root
and then set the password with passwd
.
what does an !
in password field mean?
Extracted from man shadow
:
A password field which starts with a exclamation mark means that
the password is locked. The remaining characters on the line
represent the password field before the password was locked.
It could mean that the account is locked. But also:
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).
Either way, any account with !
can't log in with applications that use the shadow file.
How come this encrypted form is only one character long?
Is not encrypted. See above.
And does an account become disabled if I put an ! in the (encrypted) password field?
See above too.
It looks like username belongs to the nopasswdlogin
group, which means that only the name is required to log in, regardless of whether a password is actually set for the account (note: this is not the same as autologin - which bypasses the login screen altogether).
You should be able to just remove the user from the group e.g. with terminal command
sudo gpasswd --delete username nopasswdlogin
Best Answer
To do it using command line:
To change the root password:
To change your user password:
To change other users password:
To do it GUI open the application
User Accounts
from the Dash and there you can change password easily for all users unless the root