查找系统中能su 切换的用户

登陆系统的用户
[root@node2 mnt]# cat /etc/shells
/bin/sh
/bin/bash
/usr/bin/sh
/usr/bin/bash

shell 是/bin/bash 或/bin/sh 都可以登陆

[root@node2 mnt]#grep -E "bash$|sh$" /etc/passwd | cut -d : -f 1
root
westos
linux

猜你喜欢

转载自blog.csdn.net/ninimino/article/details/111397623