前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >root登陆530 Permission denied、530 Login incorrect解决

root登陆530 Permission denied、530 Login incorrect解决

作者头像
loong576
修改2019-10-23 11:21:10
2.9K0
修改2019-10-23 11:21:10
举报
文章被收录于专栏:运维ABC运维ABC

背景:由于云平台上22端口不对外放开,sftp使用不了,故选择ftp服务

操作系统版本:

上传ftp包、安装ftp服务:

代码语言:txt
复制
[root@oracle-linux6 tmp]# ll
总用量 172
drwx------. 2 root root  16384 8月   2 17:39 lost+found
-rw-r--r--  1 root root 158772 3月  22 2017 vsftpd-2.2.2-24.el6.x86_64.rpm
[root@oracle-linux6 tmp]# rpm -ivh vsftpd-2.2.2-24.el6.x86_64.rpm 
Preparing...                ########################################### [100%]
   1:vsftpd                 ########################################### [100%]

重启ftp服务:

代码语言:txt
复制
[root@oracle-linux6 tmp]# service vsftpd restart
关闭 vsftpd:                                              [失败]
为 vsftpd 启动 vsftpd:                                    [确定]

查看21端口状态:

代码语言:txt
复制
[root@oracle-linux6 tmp]# netstat -an|grep 21
tcp        0      0 0.0.0.0:21                  0.0.0.0:*                   LISTEN      
unix  2      [ ]         DGRAM                    12145  @/org/kernel/udev/udevd
unix  3      [ ]         DGRAM                    12165  
unix  3      [ ]         DGRAM                    12164

root登陆报错“530 Permission denied”:

代码语言:txt
复制
[root@oracle-linux6 tmp]# ftp 127.0.0.1
Connected to 127.0.0.1 (127.0.0.1).
220 (vsFTPd 2.2.2)
Name (127.0.0.1:root): root
530 Permission denied.
Login failed.
ftp>

问题解决:

注释user_list配置文件的root用户

代码语言:txt
复制
[root@oracle-linux6 tmp]# view /etc/vsftpd/user_list
# vsftpd userlist# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers
# for users that are denied.
#root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody

再次以root登陆,报错“530 Login incorrect”:

代码语言:txt
复制
[root@oracle-linux6 tmp]# ftp 127.0.0.1
Connected to 127.0.0.1 (127.0.0.1).
220 (vsFTPd 2.2.2)
Name (127.0.0.1:root): root
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
ftp>

问题解决:

注释配置文件ftpusers的root用户

代码语言:txt
复制
[root@oracle-linux6 tmp]# view /etc/vsftpd/ftpusers 
# Users that are not allowed to login via ftp
#root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody

重新登陆,成功:

代码语言:txt
复制
[root@oracle-linux6 tmp]# ftp 127.0.0.1
Connected to 127.0.0.1 (127.0.0.1).
220 (vsFTPd 2.2.2)
Name (127.0.0.1:root): root
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (127,0,0,1,118,246).
150 Here comes the directory listing.
-rw-------    1 0        0            2172 Aug 02 10:58 anaconda-ks.cfg
-rw-r--r--    1 0        0           28568 Aug 02 10:58 install.log
-rw-r--r--    1 0        0            8442 Aug 02 10:54 install.log.syslog
226 Directory send OK.
ftp>
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2018-11-14 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档