22 lines
502 B
Markdown
22 lines
502 B
Markdown
---
|
|
tags:
|
|
- Linux
|
|
- procedural
|
|
---
|
|
|
|
# Sudoers file
|
|
|
|
Control users' `sudo` priveleges and against which services/programmes they can
|
|
run `sudo`.
|
|
|
|
Access with `sudo visudo`.
|
|
|
|
Example:
|
|
|
|
```
|
|
deploy ALL=(ALL) NOPASSWD: /bin/systemctl daemon-reload, /bin/systemctl restart eolas-api.service
|
|
```
|
|
|
|
This gives the user `deploy` the ability to run certain restricted `systemctl`
|
|
commands with no password. The second two limit him to running `systemctl`
|
|
against specific `systemd` services, not all of them.
|