- 论坛徽章:
- 0
|
原帖由 天下无聊 于 2009-1-15 11:07 发表 ![]()
谢谢sayer!当我创建了/etc/shells,该文件的就一条时:/usr/bin/false,
我发现所有用户都不能ftp到这服务器,ftp时输入用户名后,就拒绝了,但telnet到这服务器都没问题,这是为什么呢?
man ftpd
+ The user must have a standard shell returned by
getusershell().
man getusershell
getusershell() Returns a pointer to the first legal user
shell as defined in the file /etc/shells (see
shells(4)). If /etc/shells does not exist or
is not readable, getusershell() returns the
following standard system shells:
/sbin/sh
/usr/bin/sh
/usr/bin/rsh
/usr/bin/ksh
/usr/bin/rksh
/usr/bin/csh
/usr/bin/keysh
as if they were contained in /etc/shells.
The file is left open so that the next call
returns the next shell. A null pointer (0)
is returned on EOF or error.
所以,所有需要ftp登陆的用户,它用的shell必需写在/etc/shells中。如果/etc/shells不存在,只有一些常用的shell可以使用。 |
|