Groups in Apache

Posted on 2002-06-05
Medium Priority
Last Modified: 2010-03-04
I have a really easy question.
How do I add groups to Apache web server?
How do I add/remove users to groups?
Question by:rickyr
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
LVL 15

Expert Comment

ID: 7056175

>>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;
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;
admin: rickyr, samri
user: user1, user2, user3
guest: guest1, guest2, guest3

And you .htaccess file would be:
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:

good luck.
LVL 15

Accepted Solution

samri earned 800 total points
ID: 7075953

still puzzled, and need more assistance?

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month12 days, 9 hours left to enroll

777 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