seting up group access in WinXP with Apache2

I have WinXP Pro and have set up Apache Web Server 2. It went great
and have set up .htacess. Everything works fine except I would like
to run multiple usernames and passwords. Right now I only have one
username and password to long in.

All help will be welcome.
PJ6 [ Sa, 26 November 2005 01:29 ] [ ID #1073986 ]

Re: seting up group access in WinXP with Apache2

Chilly B. Willy wrote:
> I have WinXP Pro and have set up Apache Web Server 2. It went great
> and have set up .htacess. Everything works fine except I would like
> to run multiple usernames and passwords. Right now I only have one
> username and password to long in.
>
> All help will be welcome.
>

If you want to give multiple users access to a directory, one way
(perhaps the best without going to a mySQL database) is to create a
group file, and allow the group access. I have not done this in
..htaccess, but here is is in the httpd.conf file that does it.


<Directory /usr/local/apache2/htdocs/dir/mp3>
AuthType Basic
AuthName "Music collection"
AuthGroupFile /usr/local/apache2/.htgroups
AuthUserFile /usr/local/apache2/.htpasswd
Require group music gods animals
</Directory>

People in group music, gods or animals have access.


A group file lists who is in which group.

% cat /usr/local/apache2/.htgroups
music: mp3
plants: pansy rose oak fern cherry
animals: man ape tiger cheetah ant lion cat zebra
gods: foo bar

A password file holds the names of the users and their encrypted
passwords, but not the groups - that is in the group file.

ant:encrypted-data
ape:encrypted-data
cheetah:encrypted-data
cherry:encrypted-data
etc.


--
Dave K

http://www.southminster-branch-line.org.uk/

Please note my email address changes periodically to avoid spam.
It is always of the form: month-year [at] domain. Hitting reply will work
for a couple of months only. Later set it manually. The month is
always written in 3 letters (e.g. Jan, not January etc)
dave [ Sa, 26 November 2005 02:10 ] [ ID #1073987 ]

Re: seting up group access in WinXP with Apache2

On Sat, 26 Nov 2005 01:10:40 +0000, Dave
<INVALID.See-signature-for-how-to-determine [at] southminister-branch-line.org.uk>
wrote:

>Chilly B. Willy wrote:
>> I have WinXP Pro and have set up Apache Web Server 2. It went great
>> and have set up .htacess. Everything works fine except I would like
>> to run multiple usernames and passwords. Right now I only have one
>> username and password to long in.
>>
>> All help will be welcome.
>>
>
>If you want to give multiple users access to a directory, one way
>(perhaps the best without going to a mySQL database) is to create a
>group file, and allow the group access. I have not done this in
>.htaccess, but here is is in the httpd.conf file that does it.
>
>
> <Directory /usr/local/apache2/htdocs/dir/mp3>
> AuthType Basic
> AuthName "Music collection"
> AuthGroupFile /usr/local/apache2/.htgroups
> AuthUserFile /usr/local/apache2/.htpasswd
> Require group music gods animals
> </Directory>
>
>People in group music, gods or animals have access.
>
>
>A group file lists who is in which group.
>
>% cat /usr/local/apache2/.htgroups
>music: mp3
>plants: pansy rose oak fern cherry
>animals: man ape tiger cheetah ant lion cat zebra
>gods: foo bar
>
>A password file holds the names of the users and their encrypted
>passwords, but not the groups - that is in the group file.
>
>ant:encrypted-data
>ape:encrypted-data
>cheetah:encrypted-data
>cherry:encrypted-data
>etc.


Thanks Dave. I have Windows XP Pro. I loaded RedHat 8 on another
machine but can't seem to get apache to work. I installed it as a
server. I can't even figure out how to get to the command line. Talk
about being lost. I set it up with X windows. Of course I know
nothing about Linux but I do know something about Windows. So how do
I go about encrypting the passwords and then put them into a seperate
file for the use with the group. I take it that apache 2 is apache2
not matter what the os is.

I take it I can just put the above where I have my .htpasswd file.
Now do i keep my current .htpasswd file or dump it and make another??

I'm planning on getting a good apache2 book. I was thinking of teach
yourself apache2 in 24 hours by SAM's.
PJ6 [ Sa, 26 November 2005 03:47 ] [ ID #1073989 ]

Re: seting up group access in WinXP with Apache2

"Chilly B. Willy" <nobody [at] nowhere.net> schreef in bericht
news:7bifo199eekss7gtef8ii2rh88lu5b32vr [at] 4ax.com...
> On Sat, 26 Nov 2005 01:10:40 +0000, Dave
>
<INVALID.See-signature-for-how-to-determine [at] southminister-branch-line.org.uk
>
> wrote:
> Thanks Dave. I have Windows XP Pro.

> I loaded RedHat 8 on another machine ....


> So how do I go about encrypting the passwords and then put them
> into a seperate file for the use with the group.
http://httpd.apache.org/docs/2.0/mod/mod_auth.html

>I take it that apache 2 is apache2 not matter what the os is.
In general, yes. However being built -and documented- for Linux, do expect
issues to arise on other platforms.

However, defferencies between OSses can inflict you, p.e.:
- Linux is case sensitivity
foobar.htm is not the same file as FooBar.htm
- allowable characters in filenames:
linux allows \ ? + : and more as literal in a file name

> I take it I can just put the above where I have my .htpasswd file.
Yes. Rule of practice is to put those outside -just above- the document root

> Now do i keep my current .htpasswd file or dump it and make another??
If you used htpasswd.exe to create it, no need to redo.
Do take a note on the _different_ defaults on linux and MSW.
http://httpd.apache.org/docs/2.0/programs/htpasswd.html


HansH
HansH [ Sa, 26 November 2005 10:06 ] [ ID #1073991 ]

Re: seting up group access in WinXP with Apache2

On Sat, 26 Nov 2005 10:06:20 +0100, "HansH" <hans [at] niet.op.het.net>
wrote:

>"Chilly B. Willy" <nobody [at] nowhere.net> schreef in bericht
>news:7bifo199eekss7gtef8ii2rh88lu5b32vr [at] 4ax.com...
>> On Sat, 26 Nov 2005 01:10:40 +0000, Dave
>>
><INVALID.See-signature-for-how-to-determine [at] southminister-branch-line.org.uk
>>
>> wrote:
>> Thanks Dave. I have Windows XP Pro.
>
>> I loaded RedHat 8 on another machine ....
>
>
>> So how do I go about encrypting the passwords and then put them
>> into a seperate file for the use with the group.
>http://httpd.apache.org/docs/2.0/mod/mod_auth.html
>
>>I take it that apache 2 is apache2 not matter what the os is.
>In general, yes. However being built -and documented- for Linux, do expect
>issues to arise on other platforms.
>
>However, defferencies between OSses can inflict you, p.e.:
>- Linux is case sensitivity
> foobar.htm is not the same file as FooBar.htm
>- allowable characters in filenames:
> linux allows \ ? + : and more as literal in a file name
>
>> I take it I can just put the above where I have my .htpasswd file.
>Yes. Rule of practice is to put those outside -just above- the document root
>
>> Now do i keep my current .htpasswd file or dump it and make another??
>If you used htpasswd.exe to create it, no need to redo.
>Do take a note on the _different_ defaults on linux and MSW.
>http://httpd.apache.org/docs/2.0/programs/htpasswd.html
>
>
>HansH
>


I found out how to add usernames and passwords to my windows Apache 2.
I just added them to the .htpasswd file. I went to Barnes and Nobles
and read a book on apache and linux. Since I have loaded RedHat 9 on
my P3 or p4 (1.3GHz) I got the apache to work. I put my index.htm
file and the readme.txt file in the /var/www/html folder. I must say
it works great. Now I need to figure out how to get the password file
to work under linux. In windows it was real easy but then I know my
way around windows. Untill I started using OS/2 back in 90 I always
used dos.

Basicly where is the htpasswd.exe file at or what is it called in
Linux.

I saw a neat book at B&N today. It was a SAMS "teach yourself PHP,
Apache, and MYSQL in 24 hours".

I'm also looking at the Linux RedHat 9 Bible. Not too sure which one
is better or should I get them both.

Thanks
PJ6 [ So, 27 November 2005 09:07 ] [ ID #1074705 ]

Re: seting up group access in WinXP with Apache2

"Chilly B. Willy" <nobody [at] nowhere.net> schreef in bericht
news:avpio1lucuq1p853fdgjm23ila6l12t2vo [at] 4ax.com...
> I found out how to add usernames and passwords to my windows Apache 2.
> I just added them to the .htpasswd file. [...]
> I put my index.htm file and the readme.txt file in the /var/www/html
> folder. I must say it works great. Now I need to figure out how to
> get the password file to work under linux.
>
> Basicly where is the htpasswd.exe file at or what is it called in Linux
At the folder /usr/bin/ you should find the file htpasswd.

Be aware name and location may vary per redistribution of Apache and I am
unfamiliar with RH.

Just another OS twist you are likely to run into soon:
The leading dot in .htaccess makes it a hidden file on Linux, use 'ls -a' to
verify its presence.


HansH
HansH [ So, 27 November 2005 09:52 ] [ ID #1074708 ]
Webserver » alt.apache.configuration » seting up group access in WinXP with Apache2

Vorheriges Thema: Let's Put the Stock Scammer Out of Business
Nächstes Thema: Connection was refused when attempting to contact my site