My (mostly technical) blog

Archive for April 2009

Today, I was trying to password protect a directory on a website that operated the cPanel software on Bluehost and I went ahead and used the “Generate Password” function which generated this nice looking password

w7WY/a3HIUx>

Now when I was trying to login with this password, whatever I tried to do it gave me a 401 Authorization required. It just didn’t accept my password. I contacted the support of Bluehost but they weren’t able to help!

After some searching, I found this forum post http://forums.cpanel.net/showthread.php?t=112117 which makes me wonder why hasn’t cPanel fixed that bug so far?

If your password or the generated password contains greater than (<) or less than (>) characters (or maybe other ones that I haven’t discovered yet), they will be filtered out by cPanel before the password is saved, effectivley changing the password you set.

As a work around if you really need to use those characters (I liked the generated password :P) you can set it through the shell

htpasswd -n username
New password: w7WY/a3HIUx>
Re-type new password: w7WY/a3HIUx> 

username:hash

Then copy the last line (username:hash) into your .htpasswd file which you can find by editing the .htaccess file in the directory that you were trying to protect. (Does this make sense?)

Tags:

Ahmed Sabbour's Facebook profile
April 2009
S M T W T F S
 1234
567891011
12131415161718
19202122232425
2627282930  

Recently bookmarked