chpasswd
Change the passwords for multiple users by using
stdin. See also:passwd. More information: https://manned.org/chpasswd.
- Change the password for a specific user:
printf ":" | sudo chpasswd
- Change the passwords for multiple users (The input text must not contain any spaces.):
printf ":\n:" | sudo chpasswd
- Change the password for a specific user, and specify it in encrypted form:
printf ":" | sudo chpasswd
- Change the password for a specific user, and use a specific encryption for the stored password:
printf ":" | sudo chpasswd
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
