开发者

linux bash shell: how to create user with username and password from file?

开发者_如何学CI'm clear about everything except how to set password using the script. Normally, I would write:

passwd username

And the terminal would prompt for password. How to read password from file instead?


You can use:

passwd --stdin username < filename

From passwd(1):

--stdin This option is used to indicate that passwd should read the new password from standard input, which can be a pipe.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜