一 在已經安裝telnet上,執行查詢指令将查到的指令拷貝的未安裝telnet的134上。
[NTP-Fedora20 system]#whereis xinetd
xinetd: /usr/sbin/xinetd /etc/xinetd.conf /etc/xinetd.d /usr/share/man/man8/xinetd.8.gz
[NTP-Fedora20 system]#whereis telnet
telnet: /usr/bin/telnet /usr/share/man/man1/telnet.1.gz
二 啟動telnet服務,service xinetd restart,提醒缺少xinetd.service,繼續從/lib/systemd/system/xinetd.service拷貝
三 檢視xinetd.service 發現需要/etc/sysconfig/xinetd,繼續拷貝xinetd
[Service]
Type=forking
PIDFile=/var/run/xinetd.pid
EnvironmentFile=-/etc/sysconfig/xinetd
ExecStart=/usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid "$EXTRAOPTIONS"
ExecReload=/usr/bin/kill -HUP $MAINPID
四 telnet登入發現可以登入,但是沒法用root登入
上網查詢,修改/etc/securetty,中增加pts/1,pts/2,pts/3;可以解決
該檔案可控制根使用者登入的裝置,該檔案裡記錄的是可以作為根使用者登入的裝置名,如tty1、tty2等。使用者是不能從不存在于該檔案裡的裝置登入為根使用者的。這種情況使用者隻能以普通使用者登入進來,再用su指令轉為根使用者。
如果/etc/securetty是一個空檔案,則根使用者就不能從任務的裝置登入系統。隻能以普通使用者登入,再用su指令轉成根使用者。如果/etc/securetty檔案不存在,那麼根使用者可以從任何地方登入。這樣會引發安全問題,是以/etc/securetty檔案在系統中是一定要存在的。
[NTP-Fedora20 home]#cat /etc/securetty
console控制台(或者螢幕),比如說你Ctrl+Alt+x,然後echo "123" > /dev/console,123總會顯示在你的monitor上
vc/1 vc是virtual console,也可以了解為虛拟的螢幕
tty1 tty就是tty,是一個很寬泛的名詞,它是Teletype的縮,如果你指的是/dev/tty,那指目前終端
hvc0
hvsi0
xvc0
ttyS0
pts/0 pts是pesudo tty slave,是僞終端的slave端
vt指的是virtual terminal,虛拟終端,在我看來指的就是虛拟控制台