IMAGE-F...O-HELPER(1)

πŸ“¦
version 1.0.2 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

✨ IMAGE-F...O-HELPER(1) ✨

okay bestie, welcome to the image-factory-sudo-helper manual β€” yes that's the whole name, and yes the header is a whole vibe. it's the image-factory-sudo-helper's Manual, and it's about to be your new fave little permission-gatekeeper. πŸ’…


πŸŽ€ NAME πŸŽ€

image-factory-sudo-helper β€” run certain commands as root 🫢


🌸 SYNOPSIS 🌸

image-factory-sudo-helper COMMAND

like. that's it. one command. slay.


πŸ’– DESCRIPTION πŸ’–

okay so here's the tea β˜• β€” image-factory can totally be run as a normal user, no cap. but it needs root permission for a few little operations, like chmod, mount, and umount. and here's the problem: those operations cannot be secured with sudo's wildcards. like, wildcards said "i can't do this one" 😭 so image-factory-sudo-helper was introduced to check the commands using regular expression instead. icon behaviour, honestly.

image-factory-sudo-helper takes a command (parameters included, all of it) and checks if it's one of the three allowed commands:

  • chmod on files or (sub-)directories in /tmp/image-factory
  • mount of loop device in /tmp/image-factory
  • umount in /tmp/image-factory

if the given command passes β€” i.e. it is one of the allowed ones β€” it gets executed. periodt. πŸ’…

otherwise? an error message gets printed. that's the vibe check failing, bestie. πŸ’€


πŸ”₯ USAGE πŸ”₯

so to let image-factory run as a normal user, only image-factory-sudo-helper needs sudo permission for that user. no need to hand out root to everything else, we're being responsible here ✨

example sudo configuration for user jenkins:

jenkins ALL = NOPASSWD:SETENV: /usr/bin/image-factory-sudo-helper

look at her. NOPASSWD. SETENV. obsessed. πŸ‘‘


πŸ¦‹ ENVIRONMENT πŸ¦‹

  • DRYRUN β€” if this environment variable is set, the given command will not be executed. instead, it just gets printed. so like, a little rehearsal, a dress rehearsal if you will πŸŽ€ no actual root stuff happens, just vibes.

🌈 AUTHOR 🌈

Benjamin Drung <benjamin.drung@ionos.com> πŸ’œ


and that's the whole page bestie, tysm for reading πŸ’– this was image-factory-sudo-helper, dated 2020-08-05, from image-factory-sudo-helper's Manual β€” go forth and run your commands as root, but like, responsibly ✨🫢🌸

πŸ“¦ where this page comes from