Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在具有 sudo 权限的 shell 脚本中,我正在尝试更改另一个用户的密码。
我试过sudo passwd username但没有得到任何地方。
sudo passwd username
您需要使用该chpasswd命令。你可以尝试这样的事情:
chpasswd
echo "username:password" | sudo chpasswd
我用过很多次。它对我有用。