SELinux preventing fdisk from working when called by sudo with a user with staff_t role

Solution Verified - Updated -

Issue

  • fdisk -l command is not listing any output in SELinux enforcing mode
  • SELinux preventing the ability to run disk utility commands when called with sudo
type=AVC msg=audit(1381637281.396:18852): avc:  denied  { read } for  pid=1184 comm="fdisk" name="sdb1" dev=devtmpfs ino=173629 scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 
  • User has the staff_r role and sysadm_r role with sudo:
[user@rhel6 ~]$ id -Z 
staff_u:staff_r:staff_t:s0-s0:c0.c1023
[user@rhel6 ~]$ sudo id -Z
staff_u:sysadm_r:sysadm_t:s0-s0:c0.c1023

Environment

  • Red Hat Enterprise Linux 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content