FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 04-06-2008, 06:35 PM
Giulio Troccoli
 
Default Apache Authorization Access Control - location of htpasswd in Centos 5.1?

Hi Pam,

just my two cents. The command 'htpasswd -c /passwd/passwords famsite'
will do two things: create the password file called passwords in the
/passwd directory, and add the user famsite to it. So, the directory
/passwd must exist, and you did that. However, passwords is a file and
you said you created that directory. This is wrong. If it existed as a
file then htpasswd would recreate it (with the -c option) but I don't
think it would work if passwords was a directory.


Because you're doing all this as root I don't think it's a permission
problem. However, as others pointed out, because the passwords file will
have to be accessible by the user who runs Apache, then you will need to
sort that out later.


Hope this helps. Also, if you type just htpasswd with nothing else you
should have a nice help.


Giulio

Pam Astor wrote:


Hi,



I’m trying to set up a private family web site for genealogy, and want
to set up Apache Authorization access control for this site, and once
the user has logged in has access to the entire site. I’ve been
reading the info at _http://httpd.apache.org/docs/2.2/howto/auth.html_
to learn how to do this. I’m just planning on passing out the same
username and password to all family members and allow everyone in the
family to use the same username and password, to keep things simple.
The server is running Centos 5.1.




The first problem I am running into – I’m trying to use the
|_htpasswd_ <http://httpd.apache.org/docs/2.2/programs/htpasswd.html>|
utility that came with Apache 2.2 to create a password file. The
default location according to above URL is in
|/usr/local/apache2/bin/htpasswd| but apparently it’s not located
there in my install.



|I tried creating a password file by executing htpasswd -c
/passwd/passwords famsite but apparently ||_htpasswd_
<http://httpd.apache.org/docs/2.2/programs/htpasswd.html> is not in my
path, I’m getting the “cannot create file /passwd/passwords famsite”
error.|




Anyone know where the default location of htpasswd is on a centos 5.1
install? Or how to generate a password file on a centos 5.1 install?



------------------------------------------------------------------------
Pack up or back up–use SkyDrive to transfer files or keep extra
copies. Learn how.
<hthttp://www.windowslive.com/skydrive/overview.html?ocid=TXT_TAGLM_WL_Refresh_skydrive_p ackup_042008>


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

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-06-2008, 10:04 PM
mouss
 
Default Apache Authorization Access Control - location of htpasswd in Centos 5.1?

Pam Astor wrote:

Hi,

I’m trying to set up a private family web site for genealogy, and want to set up Apache Authorization access control for this site, and once the user has logged in has access to the entire site. I’ve been reading the info at http://httpd.apache.org/docs/2.2/howto/auth.html to learn how to do this. I’m just planning on passing out the same username and password to all family members and allow everyone in the family to use the same username and password, to keep things simple. The server is running Centos 5.1.



Is there any reason not to give each user his own loginassword? it
starts as "user friendly" and it ends up as a zombie...

The first problem I am running into – I’m trying to use the htpasswd utility that came with Apache 2.2 to create a password file. The default location according to above URL is in /usr/local/apache2/bin/htpasswd but apparently it’s not located there in my install.

I tried creating a password file by executing htpasswd -c /passwd/passwords famsite but apparently htpasswd is not in my path, I’m getting the “cannot create file /passwd/passwords famsite” error.



you can have a lot of fun under unix. try these:

# cp /a/foo /b/bar
...



How about creating the directory?
# mkdir /passwd
# cd /passwd
# htpsswd -c passwords famsite


that said, /passwd is a bad choice. /etc/httpd/security is better.


Anyone know where the default location of htpasswd is on a centos 5.1 install? Or how to generate a password file on a centos 5.1 install?



you can generate whatever file you want, as long as you stop trying to
create files inside directories that don't exist.



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-07-2008, 12:40 AM
Pam Astor
 
Default Apache Authorization Access Control - location of htpasswd in Centos 5.1?

> > I tried creating a password file by executing htpasswd -c /passwd/passwords
> > famsite but apparently htpasswd is not in my path, I’m getting the
> > “cannot create file /passwd/passwords famsite” error.
>
> That rather sounds like the path /passwd/passwords does not exist or is not
> writable.
>

*

Well, I just tried chomd 777 passwords and still the same problem.

Use video conversation to talk face-to-face with Windows Live Messenger. Get started!
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-07-2008, 01:09 AM
Pam Astor
 
Default Apache Authorization Access Control - location of htpasswd in Centos 5.1?

> just my two cents. The command 'htpasswd -c /passwd/passwords famsite'
> will do two things: create the password file called passwords in the
> /passwd directory, and add the user famsite to it. So, the directory
> /passwd must exist, and you did that. However, passwords is a file and
> you said you created that directory. This is wrong. If it existed as a
> file then htpasswd would recreate it (with the -c option) but I don't
> think it would work if passwords was a directory.
>
> Because you're doing all this as root I don't think it's a permission
> problem. However, as others pointed out, because the passwords file will
> have to be accessible by the user who runs Apache, then you will need to
> sort that out later.
>
> Hope this helps. Also, if you type just htpasswd with nothing else you
> should have a nice help.
>
> Giulio

*

*

AAhhhh - Thanks Giulio!

*

That was the problem I feel pretty dumb now

I deleted the password dir, then chmoded 777 passwd instead,

re ran the command and htpasswd created the user and password AOK.

Thanks again, now on to step two...

Going green? See the top 12 foods to eat organic.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-07-2008, 01:17 AM
Pam Astor
 
Default Apache Authorization Access Control - location of htpasswd in Centos 5.1?

> > I’m trying to set up a private family web site for genealogy, and want to set up Apache Authorization access control for this site, and once the user has logged in has access to the entire site. I’ve been reading the info at http://httpd.apache.org/docs/2.2/howto/auth.html to learn how to do this. I’m just planning on passing out the same username and password to all family members and allow everyone in the family to use the same username and password, to keep things simple. The server is running Centos 5.1.
> >
>
> Is there any reason not to give each user his own loginassword? it
> starts as "user friendly" and it ends up as a zombie...


OK I guess that makes sense, you mean if several people are logging in as the same user

the process will stay running and it's easier to hack?

*

> >
> > The first problem I am running into – I’m trying to use the htpasswd utility that came with Apache 2.2 to create a password file. The default location according to above URL is in /usr/local/apache2/bin/htpasswd but apparently it’s not located there in my install.
> >
> > I tried creating a password file by executing htpasswd -c /passwd/passwords famsite but apparently htpasswd is not in my path, I’m getting the “cannot create file /passwd/passwords famsite” error.


On another note, with this forums help I was able to create the user and password, so

at least that problem is resolved.

*
>
> you can have a lot of fun under unix. try these:
>
> # cp /a/foo /b/bar
> ...
>
>
>
> How about creating the directory?
> # mkdir /passwd
> # cd /passwd
> # htpsswd -c passwords famsite


Yup that works, at least one problem solved thanks.*

*

>
> that said, /passwd is a bad choice. /etc/httpd/security is better.

*

OK will do.* Question though, if both /passwd and /etc/httpd/security are both

owned by apache user, then is there really a difference in security between

using either /passwd or /etc/httpd/security ?* As long as my permissions are properly

set?

Pack up or back up–use SkyDrive to transfer files or keep extra copies. Learn how.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 01:27 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org