• 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. “btrfs” command examples to Create and Manage Btrfs File System
  2. grub-install Command Examples in Linux
  3. ceph: command not found
  4. How to install rsyslog7 when rsyslog5 is already installed in CentOS/RHEL
  5. List of SELinux Utilities
  6. CentOS / RHEL 6 : How to add/remove additional IP addresses to a network interface
  7. How to Log dropped packets using firewalld in CentOS/RHEL 7
  8. nethogs: command not found
  9. logrotate Command Examples in Linux
  10. deborphan Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright