Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi All, I am running an Apache Server and want to give access to a user "mam" and a group "sales". When I m using "require group sales" with "require user mam" only mam user can access the site, If I use it without "require user mam", users of sales group can access the site. Please tell me how can I use both at same time.
My .htaccess file is
AuthName "password protected"
AuthType Basic
AuthUserFile /etc/httpd/.htpasswd
AuthGroupFile /etc/httpd/.htgroup
require user mam
require group sales
Require user userid [userid] ...
Only the named users can access the resource.
Require group group-name [group-name] ...
Only users in the named groups can access the resource.
Create a group that contains both mam and sales, and configure:
Plz tell me how can i do this.. what I tried..I added a group biggroup and in /etc/group file i modified this
sales:x:101:user1,user2
biggroup:x:102:sales,mam
and in .htgroup file
biggroup : sales mam
in .htaccess
Require group biggroup
Now only "mam" user is able to access the site.
Last edited by mamtasahai1; 10-08-2008 at 02:17 AM.
Groups contain a list of users. From the apache manual:
Quote:
AuthGroupFile Directive
...
Each line of the group file contains a groupname followed by a colon, followed by the member usernames separated by spaces.
Yes. It will work because it will act as new gruop with three members.
I want to give the permission for existing sales group as welll as some users to access the site. can I do this?
Last edited by mamtasahai1; 10-08-2008 at 03:59 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.