• 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

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. CentOS / RHEL : Configure yum automatic updates with yum-cron service
  2. Unable to ssh to server after integration into Active Directory (AD) Domain [CentOS/RHEL 7]
  3. List of SELinux Utilities
  4. How To Increase The Retention Of “sar” Data To ‘N’ Days in Linux
  5. What is the purpose of “system user” in MySQL Replication
  6. CentOS / RHEL : How to remove used Physical Volume(PV) from Volume Group (VG) in LVM
  7. “Couldn’t authenticate with keytab while discovering which salt to use: hostname: KDC has no support for encryption type” – error while joining domain
  8. CentOS / RHEL : How to resize (extend) existing Physical Volume (PV)
  9. Why Does “/var/log/messages” Report Martian Packets
  10. Beginners Guide to Tuning Profiles in CentOS/RHEL

You May Also Like

Primary Sidebar

Recent Posts

  • How to set the default character set in MySQL and how to propagate it in a master-master replication scenario
  • “Connection reset by peer” – error while ssh into a CentOS/RHEL system with a specific user only
  • MySQL: how to figure out which session holds which table level or global read locks
  • Recommended Configuration of the MySQL Performance Schema
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary