After a new installation of ArchLinux, I created a user "chad", and set his password via command passwd. But when the system start, I can only login as root. If I login as chad, it complains the password is incorrect, which it IS correct.
Through some search on Internet, I realize it's maybe caused by wrong path of initial shell of chad. So I re-define his initial shell via root:
chsh -s /bin/bash chad
Now everything is OK.
To avoid this problem, run useradd -D
. If the path of "SHELL" is "/bin/bash", then you can use "useradd -m chad" to create user. If you create user with useradd -s /usr/bin/bash -m chad
, chad can't login, because the path of bash can only be "/bin/bash".