2010年8月10日 星期二

Start telnetd server

1. linux kernel config
check *File systems --> /dev/pts file system for Unix98 PTYs
check *Character devices -> Unix98 PTY support

2. busybox config
check *General Configuration -> Support for devfs
check *General Configuration -> Use the devpts filesystem for Unix98 PTYs

3. check /dev/ptmx
mknod -m 666 ptmx c 5 2

4. add telnet for root logins
add the following to the end of the file:0~7 表示可以有 8 個連線。

pts/0
pts/1
pts/2
pts/3
pts/4
pts/5
pts/6
pts/7

可以利用下面的 script 建立。
for i in 0 1 2 3 4 5 6 7
do
# /bin/mknod /dev/ttyp$i c 3 $i
# /bin/mknod /dev/ptyp$i c 2 $i
/bin/mknod /dev/pts/$i c 136 $i
done

5. run telnetd
/# telnetd

PS:
busybox config -> Login/Password Management Utilities -> Support for shadow passwords
不用選,還可以省點 size,並且把 /etc/shadow 移除,因為用不到。
另外在 passwd 及 shadow 的密碼都是要加密的,而非 passwd 內的密碼是明碼。

PS:
cat /etc/passwd
root::0:0:root:/bin:/bin/sh
bin::1:1:bin:/bin:/bin/sh
guest::6:6:guest:/bin:/bin/sh
nobody::99:99:nobody:/bin:bin/sh

2 則留言:

  1. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
    UNIX Training in Chennai

    回覆刪除
  2. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    Android Training in Chennai
    Ios Training in Chennai

    回覆刪除