• 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 6 : How to Disable / Enable direct root login via telnet

by admin

By default root is not allowed to login through telnet for security reasons. Passwords are transmitted in plain text when you use telnet. For this reason, the root user is not allowed to connect using telnet by default.

To verify root is disabled we can check the config file /etc/xinetd.d/telnet. When the parameter disable is set to yes, root user can not telnet into the system.

# vi /etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions; it uses 
#       unencrypted username/password pairs for authentication.
service telnet
{
        flags           = REUSE
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/sbin/in.telnetd
        log_on_failure  += USERID
        disable         = yes
}

Enabling root access

To enable root telnet login edit the /etc/xinetd.d/telnet file and set the disable parameter to no.

# vi /etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions; it uses 
#       unencrypted username/password pairs for authentication.
service telnet
{
        flags           = REUSE
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/sbin/in.telnetd
        log_on_failure  += USERID
        disable         = no
}

Disabling root access

In case you want to disable the access again, put yes against the disable parameter in the file /etc/xinetd.d/telnet.

# vi /etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions; it uses 
#       unencrypted username/password pairs for authentication.
service telnet
{
        flags           = REUSE
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/sbin/in.telnetd
        log_on_failure  += USERID
        disable         = yes
}
CentOS / RHEL : How to Disable / Enable direct root and non-root user ssh login
CentOS / RHEL : How to disable root login or root access on a system

Filed Under: Linux

Some more articles you might also be interested in …

  1. who: command not found
  2. hdparm Command Examples in Linux
  3. How to install packages using dnf in CentOS/RHEL 8
  4. How to Troubleshoot Performance Issues on Linux – Beginners Guide
  5. Archiving Failures with ORA-16038, ORA-19504, ORA-00312
  6. lastb Command Examples in Linux
  7. How to Find Filesystem Inode Utilization in Linux
  8. CentOS / RHEL 7 : How to start / Stop or enable / disable Firewalld
  9. UNIX / Linux : What is the correct permission of /tmp and /var/tmp directories
  10. Unable to login with GUI on CentOS/RHEL 7

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright