Linux – ArchLinux | Login password does not work after creating new user account

arch linuxnot-root-userrootuseraddusers

I am trying Arch Linux for learning more stuff faster and not having GUI that bothers me, so that I can focus on learning stuff from Linux itself and the terminal.
Since I was working with the default root@host I decided to create a new user.
After creting the new user with a password and a dedicated user folder I rebooted and then neither the password for the root nor the newly created user worked…
Maybe I did it wrong and don't understand how accounts work.

I used the following line to create the user in Arch.

useradd me -Umr -b /home -d /home/me -p newpass

Did I do something wrong or something? It seems i'm not able to login now from neither accounts.

My intention was to create a default user account that is not /root so that I am not always logged in as root user, so that when I boot up, the newly creted account pass is asked.

Best Answer

The -p parameter to useradd expects an encrypted password. It would be bad security practice to give a password in a command line. This is because every process on the system can read all command lines (except when using containers). So, the useradd command will not accept a plaintext password but force you to encrypt it before giving it as a parameter.

Set the password interactively afterwards:

passwd me