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 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.
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_...
On Sun, Apr 6, 2008 at 7:31 AM, Pam Astor pamastor@hotmail.com wrote:
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.
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?
There's a utility called 'which' you can use to discover the location of certain apps you want to learn about.
[jperrin@insanity ~]$ which htpasswd /usr/bin/htpasswd
However keep in mind that just because you can run the utility doesn't mean that you'll have permissions to where it puts the files. It's possible that you may have to run htpasswd as root.
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.> >> >> >> > 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?> > > There's a utility called 'which' you can use to discover the location> of certain apps you want to learn about.
Thanks! Ok I ran /usr/bin/htpasswd -c /passwd/passwords famsite as root, and still got the cannot create file error. _________________________________________________________________ Use video conversation to talk face-to-face with Windows Live Messenger. http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL...
On Sun, 6 Apr 2008, Pam Astor wrote:
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.> >> >> >> > 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?> > > There's a utility called 'which' you can use to discover the location> of certain apps you want to learn about.
Thanks! Ok I ran /usr/bin/htpasswd -c /passwd/passwords famsite as root, and still got the cannot create file error.
Does the /passwd directory exist?
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.> >> >> >> > 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?> > > There's a utility called 'which' you can use to discover the location> of certain apps you want to learn about.> > Thanks! Ok I ran /usr/bin/htpasswd -c /passwd/passwords famsite as root, and still got> > the cannot create file error.> > Does the /passwd directory exist?
It does now. It did not when I first ran the command, however I just created the directory /passwd/passwordsand re ran the command as root, and still no luck. _________________________________________________________________ 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_...
_____
From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Pam Astor Sent: Sunday, April 06, 2008 9:57 AM To: CentOS mailing list Subject: RE: [CentOS] Apache Authorization Access Control - location ofhtpasswd 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.> >> >>
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?> > >
There's a utility called 'which' you can use to discover the location> of certain apps you want to learn about.
Thanks! Ok I ran /usr/bin/htpasswd -c /passwd/passwords famsite as root,
and still got
the cannot create file error.
Does the /passwd directory exist?
It does now. It did not when I first ran the command, however I just created the directory /passwd/passwords and re ran the command as root, and still no luck.
I think you only need to create the directory /passwd, then use 'touch' to create the file, passwords
_____
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_Refre sh_skydrive_packup_042008
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.> >> >> >> > 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?> > > There's a utility called 'which' you can use to discover the location> of certain apps you want to learn about.> > Thanks! Ok I ran /usr/bin/htpasswd -c /passwd/passwords famsite as root, and still got> > the cannot create file error.> > Does the /passwd directory exist? It does now. It did not when I first ran the command, however I just created the directory /passwd/passwordsand re ran the command as root, and still no luck.
I think you only need to create the directory /passwd, then use 'touch' to create the file, passwords Thanks Thomas,
Not familiar with the "touch" command, can you point me to info on it, or show the command syntax? _________________________________________________________________ Use video conversation to talk face-to-face with Windows Live Messenger. http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL...
_____
From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Pam Astor Sent: Sunday, April 06, 2008 10:23 AM To: CentOS mailing list Subject: RE: [CentOS] Apache Authorization Access Control - locationofhtpasswd 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.> >> >>
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?> > >
There's a utility called 'which' you can use to discover the location> of certain apps you want to learn about.
Thanks! Ok I ran /usr/bin/htpasswd -c /passwd/passwords famsite as root,
and still got
the cannot create file error.
Does the /passwd directory exist?
It does now. It did not when I first ran the command, however I just created the directory /passwd/passwords and re ran the command as root, and still no luck.
I think you only need to create the directory /passwd, then use 'touch' to create the file, passwords
Thanks Thomas,
Not familiar with the "touch" command, can you point me to info on it, or show the command syntax?
Not sure if htpasswd creates the password file. If not, the as root, run: touch passwords ,in the /passwd directory. It will be an empty file, but the 'htpasswd -c' should create this for you.
I think you have a permissions problem so if you create the passwrds file with touch, you probably won't be able to add the password to it using htpasswd either.
Where are you creating these directories? In the past when I used this, my passwd directory was /var/www/passwd/
_____
Use video conversation to talk face-to-face with Windows Live Messenger. Get started! http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_W L_Refresh_messenger_video_042008
Does the /passwd directory exist?>>>> >>>>It does now. It did not when I first ran the command, however >>>>I just created the directory /passwd/passwords>>>>and re ran the command as root, and still no luck.>>>
I think you only need to create the directory /passwd, then use 'touch' to create the file, passwords Thanks Thomas,
Not familiar with the "touch" command, can you point me to info on it, or show the command syntax?
Not sure if htpasswd creates the password file. If not, the as root, run: touch passwords ,in the /passwd directory. It will be an empty file, but the 'htpasswd -c' should create this for you.
I think you have a permissions problem so if you create the passwrds file with touch, you probably won't be able to add the password to it using htpasswd either.
Where are you creating these directories? In the past when I used this, my passwd directory was /var/www/passwd/
I created /passwd/passwords in the main directory / and then ran the /usr/bin/htpasswd -c /passwd/passwords famsite command. I chmoded 777 the passwords dir so I don't think that's the problem. I'm doing this as root.
_________________________________________________________________ Use video conversation to talk face-to-face with Windows Live Messenger. http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL...
_____
From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Pam Astor Sent: Sunday, April 06, 2008 9:57 AM To: CentOS mailing list Subject: RE: [CentOS] Apache Authorization Access Control - location ofhtpasswd 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.> >> >>
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?> > >
There's a utility called 'which' you can use to discover the location> of certain apps you want to learn about.
Thanks! Ok I ran /usr/bin/htpasswd -c /passwd/passwords famsite as root,
and still got
the cannot create file error.
Does the /passwd directory exist?
It does now. It did not when I first ran the command, however I just created the directory /passwd/passwords and re ran the command as root, and still no luck.
PS, I think there are some permission requirements for the directory and file as well. I think they have to be owned by 'apache'.
_____
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_Refre sh_skydrive_packup_042008
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.> >> >> >> > 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?> > > There's a utility called 'which' you can use to discover the location> of certain apps you want to learn about.> > Thanks! Ok I ran /usr/bin/htpasswd -c /passwd/passwords famsite as root, and still got> > the cannot create file error.> > Does the /passwd directory exist? It does now. It did not when I first ran the command, however I just created the directory /passwd/passwordsand re ran the command as root, and still no luck.
PS, I think there are some permission requirements for the directory and file as well. I think they have to be owned by 'apache'.
The dirs were owned by root, so I just chown'ed to apache, re ran the command /usr/bin/htpasswd -c /passwd/passwords famsite, still no luck. _________________________________________________________________ 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_...
On Sun, 6 Apr 2008, Pam Astor wrote:
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.> >> >> >> > 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?> > > There's a utility called 'which' you can use to discover the location> of certain apps you want to learn about.> > Thanks! Ok I ran /usr/bin/htpasswd -c /passwd/passwords famsite as root, and still got> > the cannot create file error.> > Does the /passwd directory exist? It does now. It did not when I first ran the command, however I just created the directory /passwd/passwordsand re ran the command as root, and still no luck.
PS, I think there are some permission requirements for the directory and file as well. I think they have to be owned by 'apache'.
The dirs were owned by root, so I just chown'ed to apache, re ran the command /usr/bin/htpasswd -c /passwd/passwords famsite, still no luck.
Just for the sake of simplicity, please create your htpasswd file in the tmp directory and copy it elsewhere. Any user can write in /tmp .. although if you are using the root user this should not be an issue.
Just for the sake of simplicity, please create your htpasswd file in the > tmp directory and copy it elsewhere. Any user can write in /tmp .. > although if you are using the root user this should not be an issue.
Yes I'm doing this as root. _________________________________________________________________ More immediate than e-mail? Get instant access with Windows Live Messenger. http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh...
Pam Astor wrote on Sun, 6 Apr 2008 07:31:03 -0400:
I tried creating a password file by executing htpasswd -c /passwd/passwords famsite but apparently htpasswd is not in my path, Im getting the cannot create file /passwd/passwords famsite error.
That rather sounds like the path /passwd/passwords does not exist or is not writable.
Kai
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. http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL...
Pam Astor wrote:
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.
Can you show us what the result of the
ls -l /passwd/passwords
command is?
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.> > Can you show us what the result of the> > ls -l /passwd/passwords> > command is?
Thanks for asking there, actually the problem has been solved, I deleted the passwords dir and chmoded 777 the passwd dir and the unsername and password were created by htpasswd.
_________________________________________________________________ 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_...
On Sun, Apr 06, 2008 at 09:59:19PM -0400, Pam Astor alleged:
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.> > Can you show us what the result of the> > ls -l /passwd/passwords> > command is?
Thanks for asking there, actually the problem has been solved, I deleted the passwords dir and chmoded 777 the passwd dir and the unsername and password were created by htpasswd.
No, 777 is always incorrect for regular files and directories. You won't find a single example of a 777 file or directory anywhere on your machine.
Can you show us what the result of the
ls -l /passwd/passwords
command is?
Thanks for asking there, actually the problem has been solved, I deleted the passwords dir and chmoded 777 the passwd dir and the unsername and password were created by htpasswd.
Not "is", "ls" (ell ess) one of most commonly used Unix commands. But as you say, never mind.
_____
From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Pam Astor Sent: Sunday, April 06, 2008 9:59 PM To: CentOS mailing list Subject: RE: [CentOS] Apache Authorization Access Control - location ofhtpasswd 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.
Can you show us what the result of the
ls -l /passwd/passwords
command is?
Thanks for asking there, actually the problem has been solved, I deleted the passwords dir and chmoded 777 the passwd dir and the unsername and password were created by htpasswd.
chmod to 777 is never a good thing. I believe the file needs to be owned by root with group ownership to apache at 640. There are also requirements on the .htaccess file as well.
At one time, and it may still be, there was an example in one of the /etc/httpd directories using mysql to do the authentication rather than apache. It might be a little more secure but not by much if you're not using SSL.
_____
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_Refre sh_skydrive_packup_042008
on 4-6-2008 6:59 PM Pam Astor spake the following:
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.
Can you show us what the result of the
ls -l /passwd/passwords
command is?
Thanks for asking there, actually the problem has been solved, I deleted the passwords dir and chmoded 777 the passwd dir and the unsername and password were created by htpasswd.
That was your problem. /passwd/passwords should have been a file, not a directory.
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_packup_042008
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
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. http://green.msn.com/galleries/photos/photos.aspx?gid=164&ocid=T003MSN51...
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 login:password? 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.
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 login:password? 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. hthttp://www.windowslive.com/skydrive/overview.html?ocid=TXT_TAGLM_WL_Refresh_...