htpasswd creating passwd file probs

This is a discussion on htpasswd creating passwd file probs within the Apache Web Server forums, part of the Web Server and Related Forums category; Hey all! I haven't had problems with using htpasswd before - but lately, my head is spinning.... I run the ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-09-2003
sLIVER
 
Posts: n/a
Default htpasswd creating passwd file probs

Hey all!

I haven't had problems with using htpasswd before - but lately, my head is
spinning....

I run the command to make a password (eg. htpasswd -c
/home/user/passwords/passwd dude). It'll prompt for a password 2 times,
then say's it made it. If I'm logged in as root - the file isn't created.
If I'm logged in as user - the file is created, BUT, it wouldn't work....I
stirred and stirred (and fried), then I found that the permissions for the
passwd file were wrong (600)...when I make it (644) all's good!

I guess I'm wondering - Is this normal?...do you have to chmod the passwd
file once it's made always? Why can't root use htpasswd? Does any of this
make sense?

Thanks!



  #2 (permalink)  
Old 11-09-2003
Davide Bianchi
 
Posts: n/a
Default Re: htpasswd creating passwd file probs

sLIVER <sLIVER@dontemailmeanyspam.not> wrote:
> I guess I'm wondering - Is this normal?...do you have to chmod the passwd
> file once it's made always?


If you create it with the wrong permission yes, umask is used to
decide the permission of new files/directories.

> Why can't root use htpasswd?


This I don't know. Check the log files of your system. Since htpasswd
uses the crypt libraries, maybe those are broken.

Davide
  #3 (permalink)  
Old 11-09-2003
sLIVER
 
Posts: n/a
Default Re: htpasswd creating passwd file probs


"Davide Bianchi" <davideyeahsure@onlyforfun.net> wrote in message
news:bokqcr$1fofta$3@ID-18487.news.uni-berlin.de...
> sLIVER <sLIVER@dontemailmeanyspam.not> wrote:
> > I guess I'm wondering - Is this normal?...do you have to chmod the

passwd
> > file once it's made always?

>
> If you create it with the wrong permission yes, umask is used to
> decide the permission of new files/directories.
>
> > Why can't root use htpasswd?

>
> This I don't know. Check the log files of your system. Since htpasswd
> uses the crypt libraries, maybe those are broken.
>
> Davide

Thanks! I'm still not sure why htpasswd would give the file those
permissions when it didn't a while ago. What is the ideal file permissions
for the passwd files?


  #4 (permalink)  
Old 11-09-2003
Davide Bianchi
 
Posts: n/a
Default Re: htpasswd creating passwd file probs

sLIVER <sLIVER@dontemailmeanyspam.not> wrote:
> Thanks! I'm still not sure why htpasswd would give the file those
> permissions when it didn't a while ago. What is the ideal file permissions
> for the passwd files?


The permission aren't really important, as long as the file can
be read by the Apache process, the most important thing is to
put the file somewhere where he can't be reached trought the Web.
So, don't put it somewhere in your htdocs tree, put it in /etc/ or
something. Where the other configuration files of apache are is fine,
be sure to include the full path of the file in the AuthPasswdFile
directive.

Davide
  #5 (permalink)  
Old 11-09-2003
sLIVER
 
Posts: n/a
Default Re: htpasswd creating passwd file probs


"Davide Bianchi" <davideyeahsure@onlyforfun.net> wrote in message
news:boljed$1bcpmg$2@ID-18487.news.uni-berlin.de...
> sLIVER <sLIVER@dontemailmeanyspam.not> wrote:
> > Thanks! I'm still not sure why htpasswd would give the file those
> > permissions when it didn't a while ago. What is the ideal file

permissions
> > for the passwd files?

>
> The permission aren't really important, as long as the file can
> be read by the Apache process, the most important thing is to
> put the file somewhere where he can't be reached trought the Web.
> So, don't put it somewhere in your htdocs tree, put it in /etc/ or
> something. Where the other configuration files of apache are is fine,
> be sure to include the full path of the file in the AuthPasswdFile
> directive.
>
> Davide

Ya, the setup is all correct, again, it was just something I noticed lately
about setting up new passwords. It works once I change the permissions.


 


Thread Tools
Display Modes

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:42 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0