Solved

Groups in Apache

Posted on 2002-06-05
2
159 Views
Last Modified: 2010-03-04
Hello..........
I have a really easy question.
How do I add groups to Apache web server?
How do I add/remove users to groups?
regards
....Ricky
0
Comment
Question by:rickyr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 15

Expert Comment

by:samri
ID: 7056175
ricky,

>>How do I add groups to Apache web server?
This is a bit confusing.  Do you mean the group membership of apache userid belongs to (UNIX env)?
Or, do you mean Group membership for Authentication.

I would presume that you meant the latter - for authentication.

Basically, user and group works quit closely. In other words, you need to have a userfile which contains a username:password pair, and the group file would contains groupname: members1, member2, .. member pair.

>>How do I add/remove users to groups?
First, you need to manipulate userfile to manage your userlist.  you will need to use htpasswd utility that comes with Apache dist to manage users for Basic Authentication, or htdigest for Digest Authentication.

To create users;
Initial:
htpasswd -c password.file username
To add:
htpasswd password.file username
For each cases, you will be prompted for password.

Same thing applies for Digest Authentication.

The group file will be a plaintext file.  Assuming you had password.file with these users;
---password.file
samri:<encrypted-passwd>
rickyr:<encrypted-passwd>
user1:<encrypted-passwd>
user2:<encrypted-passwd>
user3:<encrypted-passwd>
guest1:<encrypted-passwd>
guest2:<encrypted-passwd>
guest3:<encrypted-passwd>
guest4:<encrypted-passwd>
----group.file
admin: rickyr, samri
user: user1, user2, user3
guest: guest1, guest2, guest3

And you .htaccess file would be:
-----.htaccess
AuthType Basic
AuthName "Apache Admin Guide Authors"
AuthUserFile /path/to/user.passsword
AuthGroupFile /path/to/group.file
Require group admin

This would only rickyr and samri would be allowed to access the resources.

Plain word: You just need to use your favourite text editor to manage the group file :) Cool huh !

More detailed information:
http://httpd.apache.org/docs/
http://httpd.apache.org/docs/howto/auth.html

good luck.
0
 
LVL 15

Accepted Solution

by:
samri earned 200 total points
ID: 7075953
ricky,

still puzzled, and need more assistance?
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question