先要通过useradd添加用户 useradd -d /opt/reconciliation -s /sbin/nologin -G root ftpUser
如果是普通的passwd,需要输入两次密码:
[root@PC2 vsftpd]# passwd ftpUser Changing password for user ftpUser. New UNIX password: BAD PASSWORD: it is based on a dictionary word Retype new UNIX password: passwd: all authentication tokens updated successfully.
通过一条命令修改用户名的密码:
echo password | passwd --stdin ftpUser