semanage-import(8)

πŸ“¦
version 3.11 Β· 2 versions
, in centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– semanage-import β€” SELinux Policy Management import tool πŸ’–

ok so this is a page from the semanage-import(8) manual, bestie. it's giving "moving your SELinux customizations between machines" and honestly? iconic. let's get into it 🫢


✨ SYNOPSIS ✨

semanage import [-h] [-N] [-S STORE] [-f INPUT_FILE]

🌸 DESCRIPTION 🌸

okay so here's the vibe. semanage is the tool you use to configure certain elements of SELinux policy without needing to modify or recompile anything from policy sources. no recompiling, no drama, we love that for us. πŸ’…

and then there's semanage import and semanage export β€” these two are a duo, a friendship bracelet situation. you use them to extract the SELinux modifications from one machine and apply them to another. moving day, but for policy. 🧳✨

⚠️ IMPORTANT WARNING, NO CAP: this will remove all current semanage customizations on the second machine. why? because the command list generated by semanage export starts with <command> -D for all semanage sub-commands. so yeah, it clears house first. know that going in. 😭

the cute part though: you can put a whole group of semanage commands inside a file and apply them to a machine in a single transaction. one shot, all done. obsessed. πŸ”₯


πŸŽ€ OPTIONS πŸŽ€

  • -h, --help β€” shows this help message and then exits. your lil "what does this do again" button πŸ¦‹
  • -N, --noreload β€” do not reload policy after commit. it commits and then just... chills. 😌
  • -S STORE, --store STORE β€” pick an alternate SELinux Policy Store to manage. choosing your own store, main character energy πŸ‘‘
  • -f INPUT_FILE, --input_file INPUT_FILE β€” the input file. the file you're importing from, bestie πŸ“

🌈 EXAMPLE 🌈

importing semanage modifications from another machine, step by step:

# semanage import -f semanage.mods

literally that's it. slay. πŸ’–


⭐ SEE ALSO ⭐

go read these next, they're all part of the same friend group:

  • selinux (8)
  • semanage (8)
  • semanage-export (8)

πŸ’œ AUTHOR πŸ’œ

this man page was written by Daniel Walsh <dwalsh@redhat.com>. thank you for your service, king 🫢


ok that's the whole page, bestie!! date on this one is 20130617 and it's from the semanage-import(8) manual, so if you're citing it in your essay, that's your source. bye ily, go import responsibly πŸŒΈβœ¨πŸŽ€