使用 su 切换到用户 hdfs 时提示:This account is currently not available,使用 hdfs 用户登陆会直接退出 ssh 窗口。
This account is currently not available
此时可以尝试检查文件 /etc/passwd,例如直接使用 grep 查看 hdfs 用户的配置 cat /etc/passwd | grep hdfs,发现它的 shel l是 /sbin /nologin,需要将起改成 /bin/bash,保存退出,再次尝试登陆即可。
/etc/passwd
cat /etc/passwd | grep hdfs
/sbin /nologin
/bin/bash