==================================================
[root@echo]#mkdir /home/ftpuser
[root@echo]#useradd -d /home/ftpuser/echo/ -s /dev/null echo > /dev/null 2>&1
[root@echo]#passwd echo
Changing password for user echo
New UNIX password:
Retype new UNIX password:
passwd:all authentication tokens updated successfully
[root@echo]#vi /etc/shells
/bin/sh
/bin/ash
/bin/tcsh
/bin/csh
/dev/null //新加入的伪shell,对应echo的shell
[root@echo]#vi /etc/passwd
修改
echo:x:501:501::/home/ftpuser/:/dev/null
为
echo:x:501:501::/home/ftpuser/./:/dev/null
==================================================
这样echo只能用ftp登录,而不能用telnet