LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-29-2005, 07:36 AM   #1
basilogics
LQ Newbie
 
Registered: Jun 2005
Location: Netherlands
Distribution: Suse 9.1 pro
Posts: 26

Rep: Reputation: 15
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
 
Old 06-29-2005, 07:52 AM   #2
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
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.
 
Old 06-29-2005, 07:56 AM   #3
basilogics
LQ Newbie
 
Registered: Jun 2005
Location: Netherlands
Distribution: Suse 9.1 pro
Posts: 26

Original Poster
Rep: Reputation: 15
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

Last edited by basilogics; 06-29-2005 at 08:37 AM.
 
Old 06-29-2005, 03:18 PM   #4
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
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'
 
Old 06-30-2005, 01:57 AM   #5
basilogics
LQ Newbie
 
Registered: Jun 2005
Location: Netherlands
Distribution: Suse 9.1 pro
Posts: 26

Original Poster
Rep: Reputation: 15
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


basilogics
 
Old 06-30-2005, 02:37 AM   #6
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
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.. (:
 
Old 06-30-2005, 04:18 AM   #7
basilogics
LQ Newbie
 
Registered: Jun 2005
Location: Netherlands
Distribution: Suse 9.1 pro
Posts: 26

Original Poster
Rep: Reputation: 15
yes, that was the final trick. the AuthName wasn't between " "
thx very much for your help!

basilogics


Last edited by basilogics; 06-30-2005 at 04:24 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Making wireless work piva.francesco Ubuntu 3 10-02-2005 03:34 PM
Making Apache work Ab3n Linux - Newbie 3 04-03-2005 05:41 PM
making it work Cap'n Skyler Linux - Newbie 8 11-16-2004 02:07 AM
making telnet work explorer Fedora 2 05-02-2004 02:56 PM
Making SCSI work gmartin Slackware 12 01-06-2004 01:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration