+ -
当前位置:首页 → 问答吧 → ftp的登录还与SHELL的类型有关?

ftp的登录还与SHELL的类型有关?

时间:2011-01-22

来源:互联网

为什么新建的一个用户ftp连接不上呢?
useradd -s /usr/bin/sh -m  -d /home/oradm oradm
难道ftp的登录还与SHELL的类型有关?真的有关啊
当oradm:x:1045:1001::/tellin/oradm:/usr/bin/sh
instanceggg:~$ echo ${SHELL}
/usr/bin/sh

instanceggg:~$ ftp 127.0.0.1
Connected to 127.0.0.1.
220-Welcome to Pure-FTPd.
220-You are user number 2 of 50 allowed.
220 You will be disconnected after 15 minutes of inactivity.
Name (127.0.0.1:oradm): oradm
331 User oradm OK. Password required
Password:
530 Authentication failed, sorry
ftp: Login failed.

失败的登录

当oradm:x:1045:1001::/tellin/oradm:/usr/bin/csh 时, 用root用户更改oradm的sh类型后,要等上几秒再重新登录才生效。
instanceggg /tellin/oradm> echo ${SHELL}
/usr/bin/csh

instanceggg /tellin/oradm> ftp 127.0.0.1
Connected to 127.0.0.1.
220-Welcome to Pure-FTPd.
220-You are user number 2 of 50 allowed.
220 You will be disconnected after 15 minutes of inactivity.
Name (127.0.0.1:oradm): oradm
331 User oradm OK. Password required
Password:
230-User oradm has group access to:  dba      video    dialout
230 OK. Current directory is /tellin/oradm
Remote system type is UNIX.
Using binary mode to transfer files.

成功的
总结:
错误的:/usr/bin/sh  
OK:  /usr/bin/csh 或/bin/bash 或/bin/ksh, /bin/sh  /usr/bin/ksh

通道是因为这个,权限问题
oradm@instanceggg:/usr/bin> ls *sh
/bin/ls: eth_alias.sh: Permission denied
/bin/ls: supportconfig.sh: Permission denied

不是. /usr/bin/ksh 同样是OK的。

搞不懂了.到底是怎么回事?
就/usr/bin/sh 不行 


再看下文件

instanceggg:/bin # ls -l /usr/bin/sh
-rwxrwxrwx 1 root root 574632 Sep 14 09:29 /usr/bin/sh
instanceggg:/bin # ls -l /usr/bin/ksh
lrwxrwxrwx 1 root root 18 Aug 31 03:46 /usr/bin/ksh -> /lib64/ast/bin/ksh
instanceggg:/bin # ls -l /usr/bin/tsh
/bin/ls: /usr/bin/tsh: No such file or directory
instanceggg:/bin # ls -l /usr/bin/csh
lrwxrwxrwx 1 root root 9 Aug 31 03:46 /usr/bin/csh -> /bin/tcsh

谁帮忙解惑下。 之前一直没注意这个问题

作者: gdutllf2006   发布时间: 2011-01-22

应该不会啊

你啥平台啊

另外,你直接
ftp -vin 127.0.0.1 <<EOF
user username password
quit
看看啥情况

作者: welcome008   发布时间: 2011-01-22