
正文
useradd密码无效
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
/**********************************************************************
* useradd密码无效
* 说明:
* 在测试Ubuntu系统的时候采用useradd自动添加用户、密码的时候,出现
* 密码无效的问题。
*
* 2018-4-24 深圳 宝安西乡 曾剑锋
*********************************************************************/ 一、参考文档:
. How do I encrypt a new user's password using the useradd command?
https://askubuntu.com/questions/752500/how-do-i-encrypt-a-new-users-password-using-the-useradd-command
. Generating Passwords Using crypt()
https://administratosphere.wordpress.com/2011/06/16/generating-passwords-using-crypt3/
. Linux useradd command
https://www.computerhope.com/unix/useradd.htm 二、解决办法:
. -p, --password PASSWORD The encrypted password, as returned by crypt. The default is to disable the password.
. 通过useradd命令行直接添加的password,需要提前进行加密;







