I am writing a bash script in order to lock down wordpress with htpasswd method.
The script requires me to write htpasswd compatible credentials to a .htpasswd file. Currently I am putting in the username and a random password which works fine but would be easier for the end user if I could drop their cpanel login details to that file instead so they can enter in their cpanel details when they are prompted to login.
Is it possible to copy the cpanel login credentials from somewhere for a user and copy the encrypted credentials to the .htpassd file?
The script requires me to write htpasswd compatible credentials to a .htpasswd file. Currently I am putting in the username and a random password which works fine but would be easier for the end user if I could drop their cpanel login details to that file instead so they can enter in their cpanel details when they are prompted to login.
Is it possible to copy the cpanel login credentials from somewhere for a user and copy the encrypted credentials to the .htpassd file?