auditadm_selinux(8)

πŸ“¦
version 20250627+git412.dbf877ab7 Β· 2 versions
, in opensuse-leap 16.0

πŸ’– auditadm_selinux(8) β€” the girl's guide πŸ’–

okay so this is the auditadm_selinux(8) page, and the manual it lives in is literally called auditadm SELinux Policy documentation. yes bestie, we're reading policy docs for fun now, this is who we are πŸ’…


✨ NAME ✨

auditadm_r β€” the Audit administrator role, brought to you by Security Enhanced Linux Policy πŸŽ€


🌸 DESCRIPTION 🌸

SELinux supports Roles Based Access Control (RBAC), no cap. Some Linux roles are login roles, and some other roles you gotta transition into. iykyk.

note bestie: every single example on this page is gonna use the staff_u SELinux user. that's the vibe. 🫢

Non-login roles are usually for administrative tasks β€” think stuff that needs root privileges. Roles control which types a user can run processes with, and roles often have default types assigned to them. slay.

The default type for the auditadm_r role is auditadm_t. iconic.

There's the newrole program, which you can use to transition directly to this role:

newrole -r auditadm_r -t auditadm_t

sudo is the preferred method for transitioning from one role to another. You set up sudo to transition to auditadm_r by adding a line kinda like this to the /etc/sudoers file:

USERNAME ALL=(ALL) ROLE=auditadm_r TYPE=auditadm_t COMMAND

then sudo will run COMMAND as staff_u:auditadm_r:auditadm_t:LEVEL ✨

When you're using a non-login role, you need to set up SELinux so that your SELinux user can actually reach the auditadm_r role. run this to see all of the assigned SELinux roles:

semanage user -l

You need to add auditadm_r to the staff_u user. You could set up the staff_u user to be able to use the auditadm_r role with a command like:

$ semanage user -m -R 'staff_r system_r auditadm_r' staff_u

SELinux policy also controls which roles can transition to a different role πŸ‘€ you can list these rules with:

search --role_allow

SELinux policy allows the sysadm_r, staff_r, secadm_r roles to transition to the auditadm_r role. periodt. πŸ’œ


πŸ¦‹ BOOLEANS πŸ¦‹

SELinux policy is customizable based on least access required. The auditadm policy is extremely flexible and has several booleans that let you manipulate the policy and run auditadm with the tightest access possible. obsessed.

  • deny_execmem β€” if you want to deny user domains applications from mapping a memory region as both executable and writable, turn this on. ⚠️ this is dangerous and the executable should be reported in bugzilla. Disabled by default.
setsebool -P deny_execmem 1
  • deny_ptrace β€” if you want to deny any process from ptracing or debugging any other processes, turn this on. Disabled by default.
setsebool -P deny_ptrace 1
  • fips_mode β€” if you want to allow all domains to execute in fips_mode, turn this on. Enabled by default.
setsebool -P fips_mode 1
  • nis_enabled β€” if you want to allow the system to run with NIS, turn this on. Disabled by default.
setsebool -P nis_enabled 1
  • selinuxuser_execstack β€” if you want to allow unconfined executables to make their stack executable, turn this on. 😭 this should never, ever be necessary. probably indicates a badly coded executable, but it could indicate an attack. this executable should be reported in bugzilla. Disabled by default.
setsebool -P selinuxuser_execstack 1
  • use_nfs_home_dirs β€” if you want to support NFS home directories, turn this on. Enabled by default.
setsebool -P use_nfs_home_dirs 1
  • use_samba_home_dirs β€” if you want to support SAMBA home directories, turn this on. Disabled by default.
setsebool -P use_samba_home_dirs 1

πŸŽ€ MANAGED FILES πŸŽ€

The SELinux process type auditadm_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. heads up tho: the process's UID still needs to have DAC permissions. πŸ‘‘

auditd_etc_t

/etc/audit(/.*)?

auditd_log_t

/var/log/audit(/.*)?
/var/log/audit.log.*

krb5_host_rcache_t

/var/tmp/krb5_0.rcache2
/var/cache/krb5rcache(/.*)?
/var/tmp/nfs_0
/var/tmp/DNS_25
/var/tmp/host_0
/var/tmp/imap_0
/var/tmp/HTTP_23
/var/tmp/HTTP_48
/var/tmp/ldap_55
/var/tmp/ldap_487
/var/tmp/ldapmap1_0

screen_home_t

/root/.screen(/.*)?
/root/.screenrc
/root/.tmux.conf
/home/[^/]+/.screen(/.*)?
/home/[^/]+/.screenrc
/home/[^/]+/.tmux.conf

πŸ’… COMMANDS πŸ’…

  • semanage fcontext can also be used to manipulate default file context mappings.
  • semanage permissive can also be used to manipulate whether or not a process type is permissive.
  • semanage module can also be used to enable/disable/install/remove policy modules.
  • semanage boolean can also be used to manipulate the booleans.
  • system-config-selinux is a GUI tool available to customize SELinux policy settings. cute little GUI moment 🐣

⭐ AUTHOR ⭐

This manual page was auto-generated using sepolicy manpage. (a bot wrote this and honestly? she ate.) πŸ”₯


🌈 SEE ALSO 🌈

selinux(8), auditadm(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8), auditadm_screen_selinux(8), auditadm_screen_selinux(8), auditadm_su_selinux(8), auditadm_su_selinux(8), auditadm_sudo_selinux(8), auditadm_sudo_selinux(8)

(and yes, the duplicates are literally in the original, so they're staying. we respect the source πŸ’€)


that's the whole page bestie!! brought to you by mgrepl@redhat.com, tagged auditadm, and filed under auditadm_selinux(8) β€” mwah, go configure some audit policy, you've got this πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from