S
S
Schoolboy.2015-10-17 20:22:39
linux
Schoolboy., 2015-10-17 20:22:39

How to set a password for a linux user?

I enter:
useradd -d /home/ch1 -g ftpch -p 123 vova
But the password is not set, in -help it says: encrypted password of the new account. How to encrypt it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Schoolboy., 2015-10-17
@viphorizon

useradd -d /home/ch1 -g ftpch -p "$(echo -n PASSWORD | openssl passwd -crypt -stdin)" vova

G
gilgameshfreedom, 2015-10-17
@gilgameshfreedom

passwd

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question