Hello,
I have kind of the same problem.The same build of grsec with kernel is across 12 servers.This is the only server where i cannot do
- Code: Select all
sudo su -
with my user with RBAC enabled . The logs show the following :
- Code: Select all
(sebastian:U:/usr/bin/sudo) change to uid 502 denied for /usr/bin/sudo[sudo:865] uid/euid:502/0 gid/egid:502/502, parent /bin/bash[bash:29671] uid/euid:502/502 gid/egid:502/502
The console for the user shows the following :
- Code: Select all
sudo: setresuid(user_uid, user_uid, ROOT_UID): Operation not permitted
The permissions on the user :
- Code: Select all
role sebastian u
# Role: sebastian
subject / {
/ h
/bin x
/dev h
/dev/null w
/dev/pts rw
/dev/tty rw
/etc r
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/ppp h
/etc/samba/smbpasswd h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/home h
/home/sebastian r
/lib64 rx
/lib64/modules h
/opt h
/opt/rh/mysql55/root/usr/lib64
/proc
/proc/bus h
/proc/filesystems r
/proc/kallsyms h
/proc/kcore h
/proc/meminfo r
/proc/modules h
/proc/slabinfo h
/proc/sys h
/selinux
/tmp wc
/usr h
/usr/bin rx
/usr/lib h
/usr/lib/locale/locale-archive r
/usr/lib64 h
/usr/lib64/gconv/gconv-modules.cache r
/usr/share h
/usr/share/terminfo r
-CAP_ALL
+CAP_SETUID
bind disabled
connect 0.0.0.0/0 stream tcp
sock_allow_family netlink
}
The sudo subject for the user :
- Code: Select all
# Role: sebastian
subject /usr/bin/sudo o {
user_transition_allow root
group_transition_allow root sebastian
/ h
/bin h
/bin/su
/dev h
/dev/console
/dev/log rw
/dev/pts
/dev/tty rw
/etc r
/etc/grsec h
/etc/gshadow h
/etc/gshadow- h
/etc/pam.d
/etc/pam.d/other r
/etc/pam.d/sudo r
/etc/pam.d/system-auth-ac r
/etc/ppp h
/etc/samba/smbpasswd h
/etc/shadow h
/etc/shadow- h
/etc/ssh h
/lib64 rx
/lib64/modules h
/proc r
/proc/bus h
/proc/kallsyms h
/proc/kcore h
/proc/modules h
/proc/slabinfo h
/selinux
/usr h
/usr/bin h
/usr/bin/sudo x
/usr/lib h
/usr/lib/locale/locale-archive r
/usr/lib64 rx
/usr/libexec h
/usr/libexec/sudoers.so rx
/usr/share h
/usr/share/locale r
-CAP_ALL
+CAP_SETGID
+CAP_SETUID
+CAP_SYS_RESOURCE
+CAP_AUDIT_WRITE
bind disabled
connect disabled
sock_allow_family netlink
}
Any help appreciated.