Linux切换用户提示This account is currently not available

版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
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登录成功。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值