Quick bash script to change .htpasswd passwords across a server

I wanted to change passwords for a users that is in all of our htpasswds. Here is a quick bash find script to do that:

for PATH in $(find / -name .htpasswd); do htpasswd -b $PATH username NewPassword; done

Comments are closed.

Powered by WordPress. Designed by WooThemes