Questions tagged «passwd»

19
如何使用Bash脚本自动添加用户帐户和密码?
我需要具有在Linux(Fedora 10)上创建用户帐户并能够通过bash脚本自动分配密码的能力(或者,如果需要的话)。 通过Bash创建用户很容易,例如: [whoever@server ]# /usr/sbin/useradd newuser 是否可以在Bash中分配一个密码,其功能与此类似,但会自动进行: [whoever@server ]# passwd newuser Changing password for user testpass. New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully. [whoever@server ]#
200 linux  bash  passwd 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.