Access your site via ftp or cPanel/plesk, making sure that hidden-files are visible.
Find your .htaccess file. Make a backup on the server by copying & renaming (uploading a .htaccess file with the wrong encoding could break it and make things even worse)
Find the lines which start with / look like the following (or thereabouts):
AuthUserFile %variable stuff here%
AuthGroupFile %more variable stuff%
AuthName %variable stuff%
AuthType %variable stuff%
require %variable stuff%
prefix those lines with a bang, hash, pound-sign, or number-symbol (whichever you prefer to call it)
# AuthUserFile %variable stuff here%
# AuthGroupFile %more variable stuff%
# AuthName %variable stuff%
# AuthType %variable stuff%
# require %variable stuff%
If you want, you can look in the file that AuthUserFile
points to & change the password to something else.
If you want to remove the password protection from the sub-domain try adding the following to the .htaccess file in the sub-domain directory:
# allows any user to see this directory
Satisfy Any
Please note that the syntax changed in Apache 2.4, this should have the same effect
Require all granted