My (mostly technical) blog

cPanel Password Protect directory bug

Posted on: April 25, 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?)

Advertisements
Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

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

Tweets

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

RSS StackOverflow

Recently bookmarked

%d bloggers like this: