SXID(1)
π SXID(1) β like, the manual page, bestie π
okay so this is sxid, a General Commands Manual page, and it is genuinely one of my faves because it is just a lil guy that watches your suid/sgid files for you. no cap. π«Ά
β¨ NAME β¨
sxid β check for changes in s[ug]id files and directories π
π SYNOPSIS π
sxid [-c, --config file] [-n, --nomail] [-k, --spotcheck]
[-l, --listall] [-h, --help] [-V, --version]
πΈ DESCRIPTION πΈ
so basically sXid checks for changes in suid and sgid files and directories, and it does that by comparing against its last check. the receipts (logs) live in /var/log/sxid.log by default. then it emails all those changes to whatever address you put in the configuration file. π¬
the config file chills at /etc/sxid.conf by default, but you can absolutely override that with the --config option and point it at an alternate file. iconic behavior honestly.
π OPTIONS π
-c,--configfile β tells it to use an alternate configuration file. you're the main character, you pick the file.-n,--nomailβ sends the output to stdout instead of emailing it. lowkey so useful for spot checks. β¨-k,--spotcheckβ checks for changes by recursing the current working directory. log files will not be rotated and no email gets sent. all output goes to stdout. π¦-l,--listallβ super handy when you're doing--spotcheckor--nomail, because it lists all the files that are logged, regardless of changes. periodt.-h,--helpβ displays a brief help message. π-V,--versionβ prints the version and exits. bye bestie! π
π₯ OUTPUT π₯
the program outputs several different checks concerning the current status of the suid and sgid files and directories on the system where it was run. this is a basic overview of the format, ok? don't come for me.
in the add remove section, new files get a + in front, and old ones get a - in front. and like β note that "removed" does not mean gone from the filesystem, it just means it is no longer sgid or suid. it's still there, it's just not doing that anymore. π
most of it is pretty easy to understand, ngl. on the sections that show changes in the file's info (uid, gid, modes...) the format is old->new. so if the old owner was mail and it is now root then it shows it as mail->root. simple as. π
the list of files in the checks is in the following format:
/full/path *user.group MODE
and MODE is the 4 digit mode, as in 4755.
in the changes section, if the line is preceded by an i then that item has changed inodes since the last check (regardless of any s[ug]id change). if there's an m then the SHA-256 checksum has changed. π
if a user or group entry is preceded by a * then its execution bit is set (ie. *root.wheel is suid, root.*wheel is sgid, *root.*wheel is +s). iykyk. β¨
on the forbidden directories, if ENFORCE is enabled an r will precede forbidden items that were successfully -s'd, and an ! will show that it was unsuccessfully -s'd (for whatever reason). it's giving attempt was made. π
π AUTHOR π
Ben Collins <bcollins@debian.org>
π«Ά REPORTING BUGS π«Ά
Timur Birsh <taem@linukz.org>
π SEE ALSO π
okay that's the whole thing bestie, we ate. this page is from Debian, dated July 29, 2013, and honestly? it still serves. stay safe out there and go check your suid files. mwah. π πβ¨
π¦ where this page comes from
- debian bookworm: sxid 4.20130802-7 Β· GPL-2.0-or-later
- debian trixie: sxid 4.20130802-7 Β· GPL-2.0-or-later
- ubuntu jammy: sxid 4.20130802-6 Β· GPL-2.0-or-later
- ubuntu noble: sxid 4.20130802-7 Β· GPL-2.0-or-later
- ubuntu questing: sxid 4.20130802-7
- ubuntu resolute: sxid 4.20130802-7build1 Β· GPL-2.0-or-later
- ubuntu stonking: sxid 4.20130802-8 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms