LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (http://www.linuxquestions.org/questions/linux-security-4/)
-   -   making a .htpasswd doesn't work (http://www.linuxquestions.org/questions/linux-security-4/making-a-htpasswd-doesnt-work-338340/)

basilogics 06-29-2005 07:36 AM

making a .htpasswd doesn't work
 
hello,

when i try to make .htpasswd on suse 9.1 pro it just doen't work. i typed htpasswd -c username .htpasswd, but i got the
message: bash: htpasswd: command not found. even when i'm in the directory in which htpasswd is (/usr/local/apache/bin) it's still a no go.
i then tried the command pico and then fill in a name and password, then saved it as .htpasswd. still nothing.

does anyone know what to do?
thx,

basilogics

Artanicus 06-29-2005 07:52 AM

try ./htpasswd if youre in the directory. If you dont specifiy the full path, only dirs in the $PATH will be checked, not even the current dir. ./command is a full path to a command that just happens to be in the current directory.

basilogics 06-29-2005 07:56 AM

ah, great. it worked.
now, i made a .htaccess file, but when i browse to the secured directory, i don't get a loginscreen. just the directory with it's contents.
here's an example:

AuthUserFile /usr/local/apache/bin/.htpasswd
AuthName .Welkom op de beveiligde directory!.
AuthType Basic
<LIMIT GET POST>
require valid-user
</LIMIT>

don't know where i made a mistake. or do i have to configure httpd.conf?
(using apache 1.3.33)

thx again,

basilogics

Artanicus 06-29-2005 03:18 PM

Make sure you have htaccess related stuff enabled in the conf, and that the directory in question is subject to the 'AllowOverride All' or similar setting so that the htaccess is actually allowed. That should do the trick. Your .htaccess is alomost identical to the ones I use except ive also set 'AuthGroupFile /dev/null'

basilogics 06-30-2005 01:57 AM

thx, but still didn't work.
when i change this section:

# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride All


this message appears in the browser:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

if i put AllowOverride All to None i don't get the message.

i'm still missing something i guess :Pengy:


basilogics

Artanicus 06-30-2005 02:37 AM

check your error_log from that time (/var/log/apache/error_log or some similar path) to see what actually went wrong. The error_log usually gives a pretty good idea on infernal errors.. (:

basilogics 06-30-2005 04:18 AM

yes, that was the final trick. the AuthName wasn't between " "
thx very much for your help!

basilogics

:newbie:


All times are GMT -5. The time now is 09:36 AM.