Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > AS/ES/WS v. 3 > Issue <<  459 of 594 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 9639
Last update: 11-29-06
Issue:
How can I restrict logins to specific domain users in my Active Directory authentication setup in Red Hat Enterprise Linux 3 and 4?
Resolution:

Release Found: Red Hat Enterprise Linux 3 and 4

To restrict access to particular domain users, use the pam module pam_access.so.

Edit /etc/pam.d/system-auth and add the following account directive before the winbind account directive:

account required /lib/security/$ISA/pam_access.so
account [default=bad success=ok user_unknown=ignore] /lib/security/$ISA/pam_winbind.so

Edit the /etc/security/access.conf file and specify the domain users who are allowed to login to the Red Hat Enterprise Linux machine. For example, to restrict access to Active Directory(AD) domain users tom, dick and harry in the MYDOMAIN domain, add the entry:

-:ALL except MYDOMAIN\tom MYDOMAIN\dick MYDOMAIN\harry:ALL

Be aware that this will allow only these 3 users and the root user to login. Even local users or user accounts from other repositories (e.g. NIS) will not be allowed to login.

Note also that explicitly specifying MYDOMAIN is only required if "winbind use default domain = no" is set in the /etc/samba/smb.conf file. If "winbind use default domain = yes" then there is no need to specify MYDOMAIN as it is implied.

For more information about using the access.conf file please read the comments and examples contained within that file.


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > AS/ES/WS v. 3 > Issue <<   459  of  594  >>