Using su The su command allows users to open a terminal window, and from that terminal start a sub shell in which the user has another identity. To perform administrative tasks, for instance, you can log in with a normal user account and type su
今天在一台新服务器下切换用户的时候出现“This account is currently not available”错误上网检索了一 下发现是用户的shell禁止登录的问题 解决办法:比如我是 su elasticsearch的时候出现的问题用cat看看 apache的帐号信息# cat /etc/passwd | grep apache发现它的shell是“/sbin /nologin”,需要改成“/bin/bash”# vi /etc/passwd修改完毕后,保存退出 这 样再 su e