linux - 无法为新添加的 linux 用户设置密码

标签 linux bash shell

<分区>

我使用这个 cmd 添加了一个新用户和一个新组。

# groupadd lfs
# useradd -s /bin/bash -g lfs -m -k /dev/null lfs
# su lfs
$ passwd
Changing password for lfs.
(current) UNIX password: 

然后无论我输入什么密码(我的 root passwd,或者一个全新的密码),它们都失败了。

$ passwd
Changing password for lfs.
(current) UNIX password: 
passwd: Authentication token manipulation error
passwd: password unchanged

我的设置有什么问题?如何成功设置密码?谢谢!

最佳答案

成为root然后修改密码。它不会询问当前密码。

su
passwd lfs

关于linux - 无法为新添加的 linux 用户设置密码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9568397/

相关文章:

C++/Linux 如何获取其他用户的读取权限统计信息?

linux - 如何让 cURL 不显示进度条?

linux - "error occurred while loading or saving configuration information"

bash - 将 grep 计数分配给变量

c - 为什么 lseek 使用偏移量 `-2` 而不是 `-1` 来反向读取?

arrays - bash - 数组扩展和函数调用

linux - 在 Bash 中捕获警报错误

bash - 如何使用 bash 在 docker 容器中获取僵尸进程

linux - 在 bash 脚本中自动向 ftp 提供命令

bash:打印 x 空行数