Forrest logo
back to the bob tool

bob:ai:2a30c

Allow user bob to restart nginx service without password using systemctl
$ bob ALL=(ALL) NOPASSWD: /bin/systemctl restart nginx
try on your machine

Allow user bob to restart nginx service without password using systemctl

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.

Questions that are answered by this command:

  • Пользователю bob нужно разрешить без ввода пароля перезагружать только службу nginx с помощью systemctl restart nginx. Допишите соответствующую строчку для /etc/sudoers (или файла в /etc/sudoers.d/)?
back to the bob tool