求助 ftp用户如何禁止shell登录且ftp正常登录
时间:2011-07-20
来源:互联网
RT ,我想ftp用户禁止shell登录,但ftp可以正常使用。
在网上查了很久还不没有解决。
我的配置文件如下 :
shells:
/bin/sh
/bin/bash
/sbin/nologin
/bin/tcsh
/bin/csh
/bin/ksh
/bin/zsh
/bin/false
vsftpd:
#%PAM-1.0
session optional pam_keyinit.so force revoke
auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed
#auth required pam_shells.so
auth include system-auth
account include system-auth
session include system-auth
session required pam_loginuid.so
vsftpd.conf
chroot_local_user=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
check_shell=NO
passwd:
xx123:x:503:503::/var/www/xx123:/bin/false
我是我的配置,可是这样配置后shell的禁止了,可是ftp也登录不上去了,请问我哪里配置有问题呢?
求解。
谢谢诶
在网上查了很久还不没有解决。
我的配置文件如下 :
shells:
/bin/sh
/bin/bash
/sbin/nologin
/bin/tcsh
/bin/csh
/bin/ksh
/bin/zsh
/bin/false
vsftpd:
#%PAM-1.0
session optional pam_keyinit.so force revoke
auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed
#auth required pam_shells.so
auth include system-auth
account include system-auth
session include system-auth
session required pam_loginuid.so
vsftpd.conf
chroot_local_user=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
check_shell=NO
passwd:
xx123:x:503:503::/var/www/xx123:/bin/false
我是我的配置,可是这样配置后shell的禁止了,可是ftp也登录不上去了,请问我哪里配置有问题呢?
求解。
谢谢诶
作者: fourpane 发布时间: 2011-07-20
把你的修改都还原回去。
直接把用户的shell改成/sbin/nologin就行了。
usermod -s /sbin/nologin username
直接把用户的shell改成/sbin/nologin就行了。
usermod -s /sbin/nologin username
作者: steptodream 发布时间: 2011-07-20
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28