[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] password protecting a directory



Hello,

We are trying to password protect a directory following the instructions
from
the Cobalt site:
----------------------------------------------------------------
1. Telnet in, and login as the User or admin
2. Navigate to the directory you want to password protect.
3. Create the .htaccess file, it should contain the following lines:

# Access file
order allow,deny
allow from all
require valid-user
Authname DirectoryName
AuthPAM_Enabled off
Authtype Basic
AuthUserFile /home/sites/sitename/web/directory/.htpasswd

Replace sitename and directory as appropriate.

Note: If you want to use the systems' /etc/passwd file for authentication
you can eliminate the AuthUserFile line from the .htaccess file above.

4. Now you must create the .htpasswd file using the htpasswd tool.
a. Type the following command to create the file and add a user:
htpasswd -c .htpasswd username
b. You will be prompted for the users' password twice.
5. If you need to add additional users to the file, use the command above
without the -c.
----------------------------------------------------------------

We telnet as admin (su) to the directory of the virtual site we wish to
protect. Then with pico we
try to create the .htaccess file. When we save the file we assign the name:
.htaccess
We cannot see this file using the ls command, is this right? Or do we save
it with a wrong name?

the command: 'htpasswd -c .htpasswd username' works but again the created
.htpasswd file
is hidden?

When we browse to the protected directory we get the error: The server
encountered an internal error or misconfiguration and was unable to complete
your request.

What are we doing wrong?

Thanks in advance,

Dennis de Gelder.