Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

Admin directory refuses to lock

Quote Reply
Admin directory refuses to lock
My admin directory refuses to lock. I tried it manually and automatically with the same results: It appears to lock only to let me in with NO passwords and links warns me the directory is still NOT locked.

When I run the lockit program, I get:

LockIt Complete LockIt
v2.0 Support: support@highlandmedia.net
Sales: sales@highlandmedia.net
URL: www.highlandmedia.net


--------------------------------------------------------------------------------

/home/burlingtonwebmagazine/cgi-bin/links/admin/ will now require a user name and password to be accessed.




Then, when I start up the link program, it letts me in without any password and displays:

Welcome to Links 2.0

WARNING: ADMIN Directory is not Password Protected!!
From your admin panel, you have full control over your link database. Here's a brief summary of what you can do!

Any ideas? I've already tried restarting my computer, dumping my browser cache, and revisiting the same address. I also tried it under Netscape with the same results. -- Except in Netscape 4.73, the error message flashes.


Quote Reply
Re: Admin directory refuses to lock In reply to
The reason is that the admin.cgi reads usernames and passwords passed via .htaccess. Since you are using another cgi script to password protect the directory where your admin.cgi script is located, it cannot recognize:

Code:

$ENV{'REMOTE_USER'}
$ENV{'AUTH_USER'}


That is why you keep getting the error message. The following codes in the admin_html.pl that control this message are the following in the sub body routine:

Code:

sub html_body {
#---------------------------------------------------------
# Prints the body of the links admin. Usually instructions.
#

&html_print_headers();
($ENV{'REMOTE_USER'} or $ENV{'AUTH_USER'}) ?
($warning = '') :
($warning = '<h1><blink>WARNING: ADMIN Directory is
not Password Protected.');


......
}


Translation: If the remote username is defined and found in the password file (.htpasswd) or the user is authorized by the host to access the file, then print nothing. If the remote username or authorized username are not found, then print the error message.

Since you are using a third party script that does not use the above mentioned environmental variables, the script sends an error message.

Regards,

Eliot Lee