用户缺少 /bin/bash shell 导致使用 filezilla 进行 ftp 时出现“登录不正确”

用户缺少 /bin/bash shell 导致使用 filezilla 进行 ftp 时出现“登录不正确”

因此,我为我的学生设置了一个 Ubuntu Server 16.04 AWS micro EC2 实例,用于上传文件。他们可以使用 putty 通过 ssh 登录,但当使用 Filezilla 的 ftp 时,他们的密码被拒绝:

Status: Connecting to ##.##.##.##:21...
Status: Connection established, waiting for welcome message...
Status: Initializing TLS...
Status: Verifying certificate...
Status: TLS connection established.
Command:    USER test1
Response:   331 Please specify the password.
Command:    PASS ********
Response:   530 Login incorrect.
Error:  Critical error: Could not connect to server
Status: Disconnected from server

但是您也可以使用 sftp 登录:

C:\Windows\SysWOW64>sftp test4@##.##.##.##
test4@##.##.##.##'s password:
Connected to test4@##.##.##.##.
sftp> quit

我通过做解决了这个问题

usermod -shell /bin/bash username

针对所有用户名。但是,我想知道为什么会发生这种情况。是不是因为缺少 bash shell 导致 Filezilla 登录时出现奇怪的字符,而这些字符与他们的密码一起输入?谢谢。

答案1

steeldriver 回答了这个问题,但我不知道如何给他投票或将他的评论标记为答案(也许我没有声誉)https://askubuntu.com/users/178692/steeldriver答案就在这里:https://linux-tips.com/t/users-with-bin-false-shell-to-login-on-vsftpd/200

相关内容