Allow the root user to Telnet

Source: Internet
Author: User
For security reasons, Linux does not allow root users to use Telnet. generally, we use a normal account to log on, and use su-to switch to the root account when the permission is required. below, we usually modify/etc/securetty to achieve the effect. The following is for testing only. Try using rootte...

For the sake of security, in Linux, it is not allowed to use the root user for Telnet. generally, we use a common account for login.
You can use su-to switch to root. The/etc/securetty is usually modified below to achieve the effect. The following is for testing only.
Try using root telnet to log on
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
Kernel 2.6.18-164. el5 on an i686
Login: root
Password:
Login incorrect
Logon not allowed
Modify/etc/securetty and add pts/0 to it.
Pts/0 # added before the file
Console
Vc/1
Vc/2
Try again
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
Kernel 2.6.18-164. el5 on an i686
Login: root
Password:
Last login: Wed Dec 8 21:23:35 on tty1
Our server will be maintained at today
[Root @ lyy ~] #
Root login successful!
About/etc/securetty
This file controls the device that the root user logs on to. it records the device names that can be logged on as the root user, such as tty1 and tty2. A user cannot be a device that never exists in this file.
Log on as the root user. In this case, the user can only log in as a common user, and then use the su command to convert it to the root user. The format of the/etc/securetty file is as follows:
#/Etc/securetty: list of terminals on which root is allowed to login.
# See securetty (5) and login (1 ).
Console
# For people with serial port les
TtyS0
# For devfs
Tts/0
# Standard les
Tty1
Tty2
Tty3
...
If/etc/securetty is an empty file, the root user cannot log on to the system from the device of the task. You can only log on as a common user, and then use the su command to convert it to the root user. If the/etc/securetty file does not exist, the root user can log on from anywhere. This will cause security issues, so the/etc/securetty file must exist in the system.

Author "Liyy study notes"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.