系统相关
首页 > 系统相关> > su: using restricted shell /usr/sbin/nologin

su: using restricted shell /usr/sbin/nologin

作者:互联网

故障

yeqiang@yeqiang-PC:~$ su -s /bin/bash nobody
请输入密码:
验证成功
su: using restricted shell /usr/sbin/nologin
This account is currently not available.
yeqiang@yeqiang-PC:~$ 

解决,采用root权限切换

yeqiang@yeqiang-PC:~$ sudo su -s /bin/bash nobody
请输入密码:
验证成功
nobody@yeqiang-PC:/home/yeqiang$ whoami
nobody
nobody@yeqiang-PC:/home/yeqiang$ 

注意,此处输入的是yeqiang的密码,且yeqiang具备root组权限

标签:sbin,shell,restricted,nobody,su,PC,home,yeqiang
来源: https://blog.csdn.net/hknaruto/article/details/122717784