deployments/aur | ||
src | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
conf | ||
install.sh | ||
pam | ||
readme.md | ||
uninstall.sh |
Crab
Crab
, a.k.a Cool Rust Authentication Binary
is a rusty replacement for sudo or doas on Linux systems.
Installation
From Source
First run cargo build --release
to compile the binary.
Then run install.sh
as root to install crab.
Run uninstall.sh
as root to uninstall crab.
Arch Based Systems
If you are on an arch based distro, crab is avaliable on the AUR as crab
.
Configuration
Each line in the configuration specifies a different rule. Each rule is applied from top to bottom,
so the first onethat matches a user is what is used. The first word is either permit
or deny
to
allow or deny a certain group. Then the tags persist
and nopass
can be added to allow authoriziation
persistance or skipping respectively. Then a user can be specified by putting their name, or a group by a
colon then the groups name. Finally, if you dont want to run that user as root, you can add as
and then
a user name to run the process as. All lines starting in a # will be ignored.
For Example
deny :docker
permit nopass persist linus as root
permit :wheel persist
#deny stallman
permit nvidia as fu
The default configuration file is stored in /usr/share/crab/crab.conf
and must be coppied to /etc/crab.conf
.