Comments on: 10 passwd Command Examples in Linux https://www.linuxtechi.com/10-passwd-command-examples-in-linux/ Tue, 12 Sep 2023 01:42:00 +0000 hourly 1 By: Ron https://www.linuxtechi.com/10-passwd-command-examples-in-linux/#comment-41562 Sat, 24 Sep 2022 03:11:56 +0000 http://www.linuxtechi.com/?p=3372#comment-41562 In reply to RoseHosting.

echo newpassword | passwd username –stdin

working on Redhat based platform (Fedora, CentOS, OEL, etc.)

]]>
By: Ron https://www.linuxtechi.com/10-passwd-command-examples-in-linux/#comment-41561 Sat, 24 Sep 2022 03:09:03 +0000 http://www.linuxtechi.com/?p=3372#comment-41561 In reply to RoseHosting.

echo -e “newpassword\nnewpassword” | passwd username

]]>
By: Mangal Chavan https://www.linuxtechi.com/10-passwd-command-examples-in-linux/#comment-12282 Wed, 17 Jul 2019 15:05:42 +0000 http://www.linuxtechi.com/?p=3372#comment-12282 while using the command passwd ,
why it showing error after changing the password or enter new password

]]>
By: Anurag https://www.linuxtechi.com/10-passwd-command-examples-in-linux/#comment-6084 Sat, 06 Oct 2018 13:13:34 +0000 http://www.linuxtechi.com/?p=3372#comment-6084 What is difference between passwd and usermod command. Even passwd can do same things that usermod does. then please tell the actual difference between passwd and usermod command.

]]>
By: Pradeep Kumar https://www.linuxtechi.com/10-passwd-command-examples-in-linux/#comment-3351 Tue, 13 Feb 2018 08:09:55 +0000 http://www.linuxtechi.com/?p=3372#comment-3351 In reply to Abhi.

Hi Abhi,

Yes, you can make the same password policy for root user but it is not recommended to implement on root.

]]>
By: Abhi https://www.linuxtechi.com/10-passwd-command-examples-in-linux/#comment-3328 Mon, 12 Feb 2018 03:47:56 +0000 http://www.linuxtechi.com/?p=3372#comment-3328 Can i make same current asking policy for root when using passwd command as root????

]]>
By: RoseHosting https://www.linuxtechi.com/10-passwd-command-examples-in-linux/#comment-307 Sun, 27 Sep 2015 16:26:15 +0000 http://www.linuxtechi.com/?p=3372#comment-307 Great examples!

The following can be used to change user password using shell script.
echo -e "newpasswordnnewpassword" | passwd username

]]>