[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Résolu] sudo et Debian



Bonjour a tous,

Dans l'idee d'eteindre une machine (Debian stable) a distance par le
web, j'experimente sudo, avec un utilisateur standard.

donc /etc/sudoers =
Host_Alias      LOCALHOST = 127.0.0.1
----> Host_Alias LOCALHOST = 127.0.0.1, machine, machine.reseau.prive, machine.reseau.tld
User_Alias      MOI = toto
Cmnd_Alias      ONOFF = /sbin/reboot, /sbin/halt, /sbin/shutdown
root    ALL=(ALL) ALL
MOI     LOCALHOST = ONOFF

puis, en étant M. Toto,
toto $ sudo reboot

Et le systeme me repond :
toto is not allowed to run sudo on machine2. This incident will be reported

Mettre le nom de la machine a la ligne Host_Alias.



Reply to: