Answer the question
In order to leave comments, you need to log in
How to properly create a user with a password in Linux?
Manjaro distribution (kernel 5.9)
I want to create a user using useradd and the -p flag to specify a password when creating.
sudo useradd -p "12345" newuser
Switch to this user and enter this password
su newuser
su: Authentication
failed But it's not correct. What is the problem? Maybe I misunderstand how the useradd utility works?
Answer the question
In order to leave comments, you need to log in
You should carefully read the description of this flag. The password hash is passed as a parameter, not plain text.
So you first need to get the hash from 12345 , and then pass it to -p
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question