• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Restrict Active Directory Users and Groups to Login to CentOS/RHEL 7 Client

By admin

Question: How to Restrict AD Users/Group to login to our server (CentOS/RHEL 7).

1. Modify the configuration file /etc/security/access.conf file – the below configuration denies all the other user but allows access from root and testgroup.

+ : Domain\testgroup : ALL
+ : root : ALL
- : ALL : ALL

2. Add pam_access.so module in /etc/pam.d/system-auth and /etc/pam.d/password-auth.

account required pam_access.so
account required pam_unix.so broken_shadow

3. Please verify the above configuration.

Note: You can add a user that is not on testgroup by adding the following line on /etc/security/access.conf:

+ : testuser:ALL 

Filed Under: CentOS/RHEL 7, Linux, OEL 7

Some more articles you might also be interested in …

  1. How To Retain Current And Older Linux Packages While Doing Update With ‘yum’ Command
  2. Linux OS Service ‘syslog’
  3. How to install and Configure VNC (TigerVNC) server in CentOS / RHEL 7
  4. Bash for loop Examples
  5. CentOS / RHEL 4 : How to install and configure FTP server (vsftpd)
  6. How to shrink root filesystem on CentOS / RHEL 6
  7. Complete Guide to Configuring iSCSI in CentOS / RHEL 7
  8. LVM Configuration : Physical Volume (PV) Operations/Utilities
  9. Understanding /etc/security/limits.conf file
  10. Rpm: Error While Loading Shared Libraries: Libz.so.1: Cannot Open Shared Object File: No Such File

You May Also Like

Primary Sidebar

Recent Posts

  • How to disable ACPI in CentOS/RHEL 7
  • How to Use real-time query to access data on a physical standby database
  • CentOS/RHEL 8: “ACPI MEMORY OR I/O RESET_REG” Server Hung after reboot
  • How to Create a Physical Standby Database by Using SQL and RMAN Commands
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary