Proftpd CentOS 用户只能使用 /bin/bash shell 登录

Proftpd CentOS 用户只能使用 /bin/bash shell 登录

我已经创建了一个用户并指定了密码和组(新组)。问题是,这个用户只有在拥有 shell = 的情况下才能登录 FTP(proftpd)/bin/bash

如果我将 shell 设置为,/bin/false那么 Proftpd 就不会让他进入并提供 530 登录不正确的响应。

我希望用户能够登录 FTP 但不能进行其他访问,因此无法通过 SSH 登录。 全部/etc/proftpd.conf为默认设置,版本1.3.3e为,CentOS 6。

答案1

您想要与 proftpd 一起使用的任何 shell 都应列在/etc/shells文件 (http://www.proftpd.org/docs/directives/linked/config_ref_RequireValidShell.html

您应该将 /bin/false 添加到 /etc/shells 或RequireValidShell off在 proftpd 配置中设置

祝你好运!

相关内容