semanage-user(8)

πŸ“¦
version 3.11 Β· 3 versions
, in centos-stream 10, centos-stream 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

🌸 semanage-user β€” the SELinux user mapping tool, bestie edition 🌸

okay so real talk, this is the semanage-user(8) page from the semanage family, and it's literally your bestie for wiring up SELinux Users to roles and MLS/MCS levels. no cap. let's get into it πŸ’…


✨ NAME ✨

semanage-user β€” SELinux Policy Management SELinux User mapping tool 🫢


πŸŽ€ SYNOPSIS πŸŽ€

semanage user [-h] [-n] [-N] [-S STORE] [ --add ( -L LEVEL -R ROLES -r
RANGE SEUSER) | --delete SEUSER | --deleteall | --extract | --list [-C]
| --modify ( -L LEVEL -R ROLES -r RANGE SEUSER ) ]

πŸ¦‹ DESCRIPTION πŸ¦‹

so semanage is the girl who configures certain elements of SELinux policy without you having to modify or recompile anything from policy sources. she's lowkey doing the most so you don't have to.

and semanage user specifically? she controls the mapping between an SELinux User and the roles and MLS/MCS levels. it's giving matchmaker, honestly. πŸ”₯


πŸ‘‘ OPTIONS πŸ‘‘

  • -h, --help β€” show this help message and exit. the "just tell me what's happening" button πŸ’–
  • -n, --noheading β€” do NOT print the heading when listing the specified object type. minimalism era ✨
  • -N, --noreload β€” do not reload policy after commit. (normally she does reload, just so we're clear πŸ‘€)
  • -S STORE, --store STORE β€” select an alternate SELinux Policy Store to manage. shopping at a different location bestie πŸ›οΈ
  • -C, --locallist β€” list local customizations only. your personal edits, not the factory defaults 🌸
  • -a, --add β€” add a record of the specified object type βž•
  • -d, --delete β€” delete a record of the specified object type πŸ—‘οΈ
  • -m, --modify β€” modify a record of the specified object type ✏️
  • -l, --list β€” list records of the specified object type πŸ“‹
  • -E, --extract β€” extract customizable commands, for use within a transaction. like, exporting the vibe for later 🧚
  • -D, --deleteall β€” remove ALL local customizations. dramatic? maybe. thorough? absolutely πŸ’€
  • -L LEVEL, --level LEVEL β€” default SELinux Level for SELinux user, s0 is the default. (MLS/MCS Systems only)
  • -r RANGE, --range RANGE β€” MLS/MCS Security Range (MLS/MCS Systems only). the SELinux Range for SELinux login mapping defaults to the SELinux user record range. the SELinux Range for SELinux user defaults to s0.
  • -R [ROLES], --roles [ROLES] β€” SELinux Roles. bestie, you must enclose multiple roles within quotes, separated by spaces. OR you can specify -R multiple times. both slay 🌈
heads up: -L and -r are for MLS/MCS systems only. don't come for me if you're on a non-MLS system, that's just what the page says πŸ™ˆ

πŸ’œ EXAMPLE πŸ’œ

List SELinux users
# semanage user -l
Modify groups for staff_u user
# semanage user -m -R "system_r unconfined_r staff_r" staff_u
Assign user topsecret_u role staff_r and range s0-TopSecret
# semanage user -a -R "staff_r" -rs0-TopSecret topsecret_u

⭐ SEE ALSO ⭐

selinux(8), semanage(8), semanage-login(8)


πŸ“ AUTHOR πŸ“

this man page was written by Daniel Walsh <dwalsh@redhat.com> β€” we love a legend 🫢


okay that's the whole page, and the date stamp on this iconic piece of work is 20130617, from the semanage-user(8) manual itself. periodt. go configure your SELinux users, main character πŸ’…βœ¨