if the script was useradd ...............<new_user>; passwd <new_user>;. is there a way to put the new password in a script? I don't need to change or add an old password for an existing user. I need to enter a brand new password twice when prompted.
Asked
Active
Viewed 436 times
0
dbruceh
- 33
- 3
-
2See [How to automatically add user account AND password with a Bash script?](https://stackoverflow.com/a/2328528/10931455) – Freddy Apr 14 '19 at 03:41
-
Thanks, I looked through the previous questions, but I didn't see that one. – dbruceh Apr 14 '19 at 04:05
-
I'm not changing a password, I'm setting it for the first time. I found the answer in the previous link. – dbruceh Apr 14 '19 at 17:15
-
1@dbruceh Changing the password or setting the password is the same thing if you're root. – Kusalananda Apr 14 '19 at 17:44