gpt4 book ai didi

linux - Cent0S 5.4 脚本中此命令的问题

转载 作者:太空宇宙 更新时间:2023-11-04 04:28:52 25 4
gpt4 key购买 nike

我在安装脚本中有此命令

Running Command: useradd ftpsecure
Running Command: /etc/init.d/vsftpd restart
Running Command: chkconfig --add vsftpd
Running Command: chkconfig vsftpd on
Running Command: /usr/sbin/groupadd cdms-users
Running Command: /usr/sbin/useradd -g cdms-users -d /ftpUploads/ cdmsUser -p cdms
[ESC[0;31mFAILEDESC[0m]

最后一个命令似乎遇到了问题。如果有人知道可能出了什么问题。

提前谢谢大家。

最佳答案

useradd-p 标志(用于指定密码)不适用于指定明文密码。

这是 useradd 联机帮助页中的描述。

   -p, --password PASSWORD
The encrypted password, as returned by crypt(3). The default is to disable the
password.

Note: This option is not recommended because the password (or encrypted password) will
be visible by users listing the processes.

You should make sure the password respects the system's password policy.

您必须为密码生成crypt 哈希值。

另一个 StackOverflow 线程中接受的答案显示了一种方法:Useradd using crypt password generation

尽管在命令行上指定纯密码可能是一个安全漏洞,因为它可能会记录在命令行历史记录中。

关于linux - Cent0S 5.4 脚本中此命令的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5654839/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com