• 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. Dependency failed for NFS server and services
  2. How to use ipset Command in Linux
  3. How to work with multiple java versions under Linux
  4. How to effectively use Man Pages under Linux
  5. firejail: command not found
  6. arecord: command not found
  7. Wallch (Wallpaper Changer) – Rotate Ubuntu Desktop Wallpapers
  8. How to uninstall jellyfish software package from Ubuntu
  9. “kernel: INFO: task {PROCESS}:{PID} blocked for more than 120 seconds.” – CentOS/RHEL Troubleshooting
  10. lsb_release: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • “aws s3 mv” Command Examples
  • “aws s3 mb” Command Examples
  • “aws s3 ls” Command Examples
  • “aws s3 cp” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright