我有一个Red Hat Enterprise Linux 服务器版本 7.7. 已创建本地用户。为用户配置了 sudoers 文件ALL = (ALL) ALL
。用户可以执行任何命令,例如:sudo ls、sudo cat、sudo 等等。
但是,以下命令不起作用:sudo su -
它收到错误消息:
Last login: Tue Jun 15 10:21:52 -03 2021 on pts/1
su: failed to execute /bin/bash: Permission denied
我已经检查了文件和目录权限。
[root@hostname ~]$ ls -l /bin/bash
-rwxr-xr-x 1 root root 964592 Mar 12 2019 /bin/bash
[root@hostname ~]$ ls -ld /usr/lib*
drwxr-xr-x 40 root root 12288 Mar 26 2020 /usr/lib
drwxr-xr-x 59 root root 36864 May 11 2020 /usr/lib64
drwxr-xr-x 24 root root 4096 Mar 24 2020 /usr/libexec
[root@hostname ~]$ ls -ld /tmp/
drwxrwxrwt 75 root root 12288 Jun 15 09:34 /tmp/
[root@hostname ~]$ stat /
File: ‘/’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: fd01h/64769d Inode: 2 Links: 22
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2021-06-15 09:30:45.000000000 -0300
Modify: 2020-03-27 17:56:07.000000000 -0300
Change: 2021-06-15 09:30:44.000000000 -0300
Birth: -
有任何想法吗?