Bonjour, j'aimerai modifier le fichier sudoers.tmp pour permettre a deux fichiers d’exécuter des commandes avec sudo sans devoir y mettre le mots de passe...
(je suis connecté avec koditv comme utilisateur)
j'ai essayer de mettre la ligne suivante:
%koditv ALL = (ALL) NOPASSWD: /home/koditv/.fichierquimodifietrue.sh,/home/koditv/fichierquimodifiefalse.sh
Le fichier sudoers.tmp en question:
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
#crée par moi
%koditv ALL = (ALL) NOPASSWD: /home/koditv/.fichierquimodifietrue.sh
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
Le problème est que lorsque je lance mon script compilé avec chmod +x il me demande le mdp pour sudo, j'en déduis que la ligne n'a pas été prise en compte...
Quelqu'un aurait une Idée ?