How to skip interactive mode of Linux passwd command

Normally user interaction is required to reset the password in Linux server.

This article explains a way to skip the interactive prompt so that we can completely automate the procedure of resetting the password.

We can use the following format to skip the interactive prompt for password reset.

 #echo PASSWORD | passwd USERNAME --stdin

Where replace USERNAME and PASSWORD appropriately.

Leave a Reply

Your email address will not be published. Required fields are marked *