eolas/zk/Sudoers_file.md

502 B

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.