This account is currently not available

今天在linux下切换用户发现提示This account is currently not available,说是无效用户了后来网上查了一下发现是用户的shell禁止登陆了,解决方法只要开启shell登陆便可。
 

解决办法:
好比我是 su kafka的时候出现的问题
用vi看看 kafka的账号信息
# cat /etc/passwd | grep kafka
发现它的shell是“/sbin /nologin”,须要将起改为“/bin/bash”
# vipw /etc/passwd
修改完毕后,保存退出linux

这 样再 su apache就能够很容易进去了shell

命令记录:apache

login as: rootbash

root@10.0.0.10′s password:ip

[root@apache-2 ~]# vi /etc/passwdkafka

将不能登陆的用户后面修改成/bin/bashclass

‘ESC’ + wq 保存退出再切换登陆你刚才的用户就能够了登录

相关文章
相关标签/搜索