- 论坛徽章:
- 0
|
置顶的帖我看了,在狗狗上也找了很久,但问题依旧,我的是FC4 2.6.11
我的配置过程大概如下:
1)
#vi virtualus.txt
linux
123456
tt
123
2)
- #db_load -T -t hash -f ./virtualus.txt /etc/vsftpd/vsftpd_login.db
- #chmod 600 /etc/vsftpd/vsftpd_login.db
复制代码
3) 新建用户
- #useradd -d /ftpsite virtualus
- #chmod 700 /ftpsite
复制代码
4)我的pam
#cat /etc/pam.d/vsftpd
- #%PAM-1.0
- #auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed
- #auth required pam_stack.so service=system-auth
- #auth required pam_shells.so
- #account required pam_stack.so service=system-auth
- #session required pam_stack.so service=system-auth
- auth required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login
- account required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login
复制代码 (注:这里是两行,没错)
5)我的vsftpd.conf 配置
- anonymous_enable=NO
- local_enable=YES
- write_enable=NO
- local_umask=022
- dirmessage_enable=YES
- xferlog_enable=YES
- xferlog_file=/var/log/vsftpd.log
- xferlog_std_format=YES
- pam_service_name=vsftpd
- connect_from_port_20=YES
- ftpd_banner=Welcome to S_ FTP server.
- listen=YES
- listen_port=2121
- one_process_model=NO
- chroot_local_user=YES
- guest_enable=YES
- guest_username=virtualus
复制代码
6)重启vsftpd
7)
- [root@localhost vsftpd]# ftp 127.0.0.1 2121
- Connected to 127.0.0.1.
- 220 Welcome to S_FTP server.
- 530 Please login with USER and PASS.
- 530 Please login with USER and PASS.
- KERBEROS_V4 rejected as an authentication type
- Name (127.0.0.1:root): linux
- 331 Please specify the password.
- Password:
- 500 OOPS: priv_sock_get_result
- Login failed.
- 421 Service not available, remote server has closed connection
- ftp>;
复制代码
改来改去都是这个错误
用系统那个virtualus登录就这样:
- Name (127.0.0.1:root): virtualus
- 331 Please specify the password.
- Password:
- 530 Login incorrect.
- Login failed.
- ftp>;
复制代码
最主要的原因可能在这里,但我不知道它具体是什么意思
- [root@localhost vsftpd]# tail -f /var/log/messages
- Oct 27 01:37:47 localhost vsftpd: PAM [dlerror: <*unknown module path*>;: cannot open shared object file: No such file or directory]
- Oct 27 01:37:47 localhost vsftpd: PAM adding faulty module: <*unknown module path*>;
- Oct 27 01:38:22 localhost vsftpd: PAM (vsftpd) illegal module type: r
- Oct 27 01:38:22 localhost vsftpd: PAM (vsftpd) no control flag supplied
- Oct 27 01:38:22 localhost vsftpd: PAM (vsftpd) no module name supplied
- Oct 27 01:38:22 localhost vsftpd: PAM unable to dlopen(<*unknown module path*>;)
- Oct 27 01:38:22 localhost vsftpd: PAM [dlerror: <*unknown module path*>;: cannot open shared object file: No such file or directory]
- Oct 27 01:38:22 localhost vsftpd: PAM adding faulty module: <*unknown module path*>;
- Oct 27 02:01:01 localhost crond(pam_unix)[9531]: session opened for user root by (uid=0)
- Oct 27 02:01:02 localhost crond(pam_unix)[9531]: session closed for user root
复制代码
vsftpd.log中只有一行
- [root@localhost log]# cat vsftpd.log
- Wed Oct 26 12:28:46 2005 1 127.0.0.1 49 /pub/test.txt b _ o a ? ftp 0 * c
复制代码
另:
vsftpd是在装系统时选进去的,
用ldd命令检查vsftpd文件时已加载/lib/libpam.so.0
用系统默认的db4的db_load生成的虚拟用户数据文件(不知道还需要什么特别的配置,因为斑竹wolfg在http://bbs.chinaunix.net/forum/viewtopic.php?show_type=&p=3905109#3905109中说是可以的)
还有,FC4默认打开的那个selinux也关了.
应该可以说是问题大综合了,指各位大侠指教了.先谢了 |
|