summaryrefslogtreecommitdiff
path: root/readme.md
diff options
context:
space:
mode:
authortylermurphy534 <tylermurphy534@gmail.com>2022-11-19 17:37:56 +0000
committertylermurphy534 <tylermurphy534@gmail.com>2022-11-19 17:37:56 +0000
commitce6af95b74106d65c3d12f745d215732076562b9 (patch)
tree6f6c2ef19b93c80b9cc4567a4a94ce3621ff8eb4 /readme.md
parentupdate aur depends (diff)
parentfix install file part 2 (diff)
downloadcrab-ce6af95b74106d65c3d12f745d215732076562b9.tar.gz
crab-ce6af95b74106d65c3d12f745d215732076562b9.tar.bz2
crab-ce6af95b74106d65c3d12f745d215732076562b9.zip
Merge pull request '0.6.0' (#1) from dev into main
Reviewed-on: https://g.tylerm.dev/tylermurphy534/crab/pulls/1
Diffstat (limited to 'readme.md')
-rw-r--r--readme.md41
1 files changed, 34 insertions, 7 deletions
diff --git a/readme.md b/readme.md
index 971c469..e191759 100644
--- a/readme.md
+++ b/readme.md
@@ -3,20 +3,47 @@
# Installation
### From Source
-First run `cargo build --release` to compile the binary.
-Then run `install.sh` as root to install crab.
+To be able to build the package, you need cargo wich you can get either though rust or rust up.
-Run `uninstall.sh` as root to uninstall crab.
+To build, run the following commands below in the root directory of the repo. Make sure to run the shell script as root.
+```bash
+cargo build --release
+./deployments/source/install.sh
+```
+
+To uninstall, just run the following script as root.
+```bash
+./deployments/source/uninstall.sh
+```
### Arch Based Systems
If you are on an arch based distro, crab is avaliable on the [AUR](https://aur.archlinux.org/packages/crab) as `crab`.
+```
+paru -S crab
+```
# Configuration
-Crab supports multiple users with persistence. Each line of the config is the username, then `true` of `false` if the crab authentication persists.
+
+The default configuration file is stored in `/usr/share/crab/crab.conf` and must be coppied to `/etc/crab.conf`.
+```bash
+cp /usr/share/crab/crab.conf /etc/crab.conf
+chown root:root /etc/crab.conf
+chmod 600 /etc/crab.conf
+```
+
+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
```
-root true
-tylerm false
+deny :docker
+permit nopass persist linus as root
+#deny stallman
+permit :wheel persist
+permit nvidia as fu
```
-The default configuration file is stored in `/usr/share/crab/crab.conf` and must be coppied to `/etc/crab.conf`.
+Please make sure when editing your config that not normal users can edit the file, but only root. If normal users can edit the config, they can add themselvs as permitted and get elevated privilages.