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

The Geek Diary

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

CentOS / RHEL 7 : How to enable telnet for a group of users

by admin

In CentOS/RHEL 7, the /etc/pam.conf is depreciated and /etc/pam.d/remote will be used for controlling the telnet services. Follow the steps shown below to enable the telnet access to a group of users only.

Enabling telnet for group of users

1. Create a new group for users that are allowed to run telnet

# groupadd telnetusers

2. Add users to the group

# usermod -G telnetusers user01

3. Create the file /etc/security/telnet-group-users, and add the telnetusers group to the file.

# cat /etc/security/telnet-group-users
telnetusers

4. Make sure /etc/security/telnet-group-users only writable for root user.

# ls -l /etc/security/telnet-group-users
-rw-r--r-- 1 root root 7 Sept 4 10:32 /etc/security/telnet-group-users

5. Add following rules to /etc/pam.d/remote

auth required pam_listfile.so item=group sense=allow file=/etc/security/telnet-group-users

6. Verify the telnet connectivity to the server with any one of the user in the group “telnetusers”.

Filed Under: CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. DNF Update Fails With Error “GPG check FAILED” – CentOS/RHEL 8
  2. How to Disable TLS 1.1 Cockpit port 9090
  3. Understanding System Security Services Daemon (SSSD)
  4. CentOS / RHEL 7 : Configuring NTP using chrony
  5. Troubleshooting kdump Issues in CentOS/RHEL
  6. How to Back Up and Restore XFS File Systems (xfsdump / xfsrestore)
  7. “Couldn’t find device with uuid [UUID]” – error whith pvs command
  8. Invalid ABI Option abi=aapcs-linux
  9. CentOS / RHEL : How to backup/restore configuration using authconfig
  10. How to move /tmp on a separate disk as a separate mount point (Online)

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright