SCADO(1)
π NAME π
scado β Script Capability Ambient DO (yes bestie, that's the whole name, it's giving Very Serious Acronym Energy π )
β¨ SYNOPSIS β¨
scado -D | -e | -l
scado -u command | -U
scado -h
Three little modes, pick your fighter πΈ
π¦ DESCRIPTION π¦
Okay so first things first: cado(1) is the whole system that lets your sysadmin delegate capabilities to users. And you, a humble user, get to hand out a subset of those ambient capabilities to programs you trust. Every user gets to write their own personal list of trusted programs + which capabilities they get, and that list lives in a scado file. Then cado -S or cado --scado runs those trusted programs with no further authentication. Slay. And because of that, you can even run programs that need specific capabilities from inside a bash script. Iconic behavior, honestly.
So scado is the command you run to create, edit, check, or delete your very own scado file. It's your file, your rules (within the rules) π«Ά
Each line of a scado file has this syntax:
path_of_the_executable_file : capability_list
or
path_of_the_executable_file : capability_list :
sha256_digest_of_the_executable
Peep the EXAMPLES section at the end of this man page for more info, bestie. Also: everything on a line after a # sign is a comment β trailing comments, whole-line comments, all of it. β¨
The path_of_the_executable_file must be absolute. No relative paths, no shortcuts, absolute or nothing.
The capability_list is a comma separated list of capability names or capability masks. And for brevity β because typing is hard and life is short β the cap_ prefix can be omitted (e.g. net_admin and cap_net_admin mean the exact same thing π
).
The sha256_digest_of_the_executable is the anti-TOCTTOU defense. Here's the vibe: when you want to run the file at path_of_the_executable_file granting it some of the capabilities in the capability_list, the permission is denied if its sha256 digest does not match sha256_digest_of_the_executable. No match, no run, periodt.
If there are only two colon (:) separated fields on a line, that means you trust the integrity of that file a priori. That's for stuff like a program in /bin or /usr/bin that users can't modify anyway. Chill, no digest needed.
If there are three fields (i.e. two colon characters), that means you do want the cryptographic digest check on the executable's integrity. And here's the cute part: when you edit your scado file and the sha256_digest_of_the_executable field is empty, scado computes it automatically when the scado file is saved. It literally does the math for you π§
Scado asks for user authentication by PAM to confirm any modification of the scado file. So yes, it's checking that it's really you before it touches anything.
There's also a TOCTTOU protection at running time: cado -S copies the executable file into a safe place where the user can't change it, and runs it only if the integrity check on it succeeds. So the user (or a malicious intruder acting as the user π) cannot modify the file after the integrity check has completed and before the program is loaded. Race condition? Not today. π
π OPTIONS π
scado accepts the following options:
-l,--listβ Display the current scado file. Note: the actual file in the file system is not accessible by unprivileged users, for security reasons. So this is your peek behind the curtain π-e,--editβ Edit the scado file of the current user using the editor specified by either theVISUALor theEDITORenvironment variable (checked in that order, bestie βVISUALfirst, thenEDITOR). After you exit from the editor, the modified file will be installed automatically. β¨-D,--deleteβ Delete the current user's scado file. Gone. Poof. π¦- *
-u*command,--updatecommandβ Recompute the hash of the line which starts withcommand. -U,--update-allβ Update all the digest entries. All of them. Every single one. π-h,--helpβ print a short usage banner and exit.
π EXCEPTIONS FILES EXAMPLES π
Let's get concrete, bestie.
Example one β allow cado -S to run /bin/ping providing it with the cap_net_raw capability, without any integrity check:
/bin/ping : cap_net_raw
Example two β allow the activation of ping with cap_net_raw provided it has a specific SHA256 digest:
/bin/ping : cap_net_raw :
dcb237f1cb20ee7b1550900d1b524c554063fd17fc673c56d341736ced6bed4b
Example three β compute the SHA256 digest of (the current version of) ping so, allow the activation of ping with cap_net_raw provided it has not been modified:
/bin/ping : cap_net_raw :
(See that empty digest field? That's the auto-compute-on-save situation from up above. It's giving self-sufficient π§)
And if one of the example lines here above has been inserted in the user scado file using scado -e, it is possible to execute ping as follows:
cado -S cap_net_raw /bin/ping
That's the whole loop, bestie. Write it, hash it, run it. π
π SEE ALSO π
Okay that's the whole page!! Written by the absolute legends at VirtualSquare Labs, dated June 23, 2016. Go forth and manage your capabilities responsibly, queen πβ¨π
π¦ where this page comes from
- debian bookworm: cado 0.9.5-2 Β· GPL-2.0-or-later
- debian trixie: cado 0.9.6-1+b1 Β· GPL-2.0-or-later
- ubuntu jammy: cado 0.9.5-1 Β· GPL-2.0-or-later
- ubuntu noble: cado 0.9.6-1build1 Β· GPL-2.0-or-later
- ubuntu resolute: cado 0.9.6-1build2 Β· GPL-2.0-or-later
- ubuntu stonking: cado 0.9.6-1build2 Β· 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