普通方法报错
# su -c "ls /" yeqiang
This account is currently not available.
原因
# cat /etc/passwd | grep yeq
yeqiang:x:1000:1000::/home/yeqiang:/sbin/nologin
解决,启动进程时,指定shell
# su -s /bin/bash -c "ls /" yeqiang
a.c a.out bin boot data dev etc home lib lib64 media mnt nonexist-gopath opt proc root run sbin srv sys tmp usr var