1. Shell Script 생성

# cat > /bin/wall
===================================================================
#!/bin/sh

trap "echo Sorry; exit 0" 1 2 3 4 5 6 7 10 15

echo "***********************************************************"
echo "* *"
echo "* You are NOT allowed Telnet Service!!! *"
echo "* *"
echo "***********************************************************"

exit 0
====================================================================

# chmod 755 /bin/wall

2. Shell Script 등록

# cat >> /etc/shells
======================
/bin/ksh
/bin/bash
/bin/csh
/bin/wall
======================

3. /etc/passwd 파일 수정
root:x:0:1:Super-User:/:/bin/ksh
~
temp:x:102:1::/export/temp:/bin/wall <- 수정


4. Telnet 접속 확인

# telnet localhost

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.


SunOS 5.8

login: temp
Password:
Last login: Thu Apr 29 18:51:27 from localhost
***********************************************************
* *
* You are NOT allowed Telnet Service!!! *
* *
***********************************************************
Connection closed by foreign host.


5. FTP 접속 확인

# ftp localhost
Connected to localhost.
220 test04 FTP server (SunOS 5.8) ready.
Name (localhost:root): temp
331 Password required for temp.
Password:
230 User temp logged in.
ftp>
2009/08/27 11:33 2009/08/27 11:33

Trackback Address :: https://youngsam.net/trackback/861