Outils pour utilisateurs

Outils du site


tech:notes_sudo_et_sudoers

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
tech:notes_sudo_et_sudoers [2025/10/28 15:28] Jean-Baptistetech:notes_sudo_et_sudoers [2026/03/03 17:04] (Version actuelle) Jean-Baptiste
Ligne 56: Ligne 56:
 </code> </code>
  
 +Restricting a sudo command to specific arguments
 +<code bash>
 +user  ALL=(root) NOPASSWD: /usr/bin/systemctl (stop|start|restart) (httpd|mysql)
 +</code>
 +
 +Prohibiting Command Arguments with sudo
 +Follow the program name with the single argument “” in /etc/sudoers:
 +<code bash>
 +smith  ALL = (root) /usr/local/bin/mycommand ""
 +</code>
  
  
tech/notes_sudo_et_sudoers.1761661732.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki