欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

linux切换用户时报错 this account is currently not available

程序员文章站 2022-07-11 08:26:55
...

linux切换用户时报错 this account is currently not available

在安装完redis之后系统创建了一个名叫redis用户,但切换到这个用户的时候却报了错 this account is currently not available 。
分析:从this account is currently not available 英文中可以了解到账号存在但不能使用(无效)。
原因:该用户在系统的shell中不可使用
解决办法:
查看/etc/passwd

vim /etc/passwd

linux切换用户时报错 this account is currently not available

/bin/bash //在系统的shell模式下可以使用
/sbin/nologin   //不可用

将不能登入的账号改为/bin/bash即可登入
linux切换用户时报错 this account is currently not available
在这里我将redis设为/bin/bash
linux切换用户时报错 this account is currently not available
到此切换成功。

相关标签: linux