chpasswd
Change the passwords for multiple users by using stdin. More information: <https://manned.org/chpasswd.8>.
Install
- All systems
-
curl cmd.cat/chpasswd.sh
- Debian
-
apt-get install passwd - Ubuntu
-
apt-get install passwd -
Alpine
-
apk add shadow - Arch Linux
-
pacman -S shadow - Kali Linux
-
apt-get install passwd - Fedora
-
dnf install shadow-utils-2 - Windows (WSL2)
-
sudo apt-get updatesudo apt-get install passwd - Raspbian
-
apt-get install passwd - Docker
-
docker run cmd.cat/chpasswd chpasswdpowered by Commando
Change the passwords for multiple users by using stdin. More information: <https://manned.org/chpasswd.8>.
-
Change the password for a specific user:
printf "username:new_password" | sudo chpasswd -
Change the passwords for multiple users (The input text must not contain any spaces.):
printf "username_1:new_password_1\nusername_2:new_password_2" | sudo chpasswd -
Change the password for a specific user, and specify it in encrypted form:
printf "username:new_encrypted_password" | sudo chpasswd --encrypted -
Change the password for a specific user, and use a specific encryption for the stored password:
printf "username:new_password" | sudo chpasswd --crypt-method NONE|DES|MD5|SHA256|SHA512
© tl;dr; authors and contributors