版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
http://blog.csdn.net/wenshuangzhu/article/details/44079163

【问题描述】
本机登录ftp失败:
vm144:/home> ftp vm144
Connected to vm144.
220 (vsFTPd 2.0.7)
Name (vm144:root): ftp01
331 Please specify the password.
Password:
530 Login incorrect.
ftp: Login failed.
ftp> ^D 221 Goodbye.


尝试在本机切换到ftp01用户也失败,提示This account is currently not available :
vm144:~ # su - ftp01
This account is currently not available.

【问题解决】
查看用户shell为/sbin/nologin:
vm144:~ # grep ftp01 /etc/passwd
ftp01:x:1002:1000::/home/vms/sdr/work/:/sbin/nologin

修改用户shell:
vm144:~ # usermod -s /bin/bash ftp01
再次su - ftp01:
vm144:~ # su - ftp01
ftp01@vm144:~> 

切换用户成功。

再次通过FTP登录:
vm144:~ # ftp vm144
Connected to vm144.
220 (vsFTPd 2.0.7)
Name (vm144:root): ftp01
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ^D 221 Goodbye.

FTP登录成功。


Logo

更多推荐