Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

[ABUL/tech] sudo et Debian

3 réponses
Avatar
Bernard Mayer
Bonjour.

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
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

Quelque chose m'a echappé en lisant la doc ?

Merci d'avance pour vos lumieres.



--
Pensez à lire la FAQ de la liste avant de poser une question :
http://wiki.debian.net/?DebianFrench

Pensez à rajouter le mot ``spam'' dans vos champs "From" et "Reply-To:"

To UNSUBSCRIBE, email to debian-user-french-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

3 réponses

Avatar
Jean-Luc Coulon (f5ibh)
--=-FdCAmVq6VqTSDl2/BdtC
Content-Type: text/plain; charset=iso-8859-1; DelSp=Yes; Format=Flowed
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Le 14.01.2006 14:19:23, Bernard Mayer a écrit :
Bonjour.

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
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

Quelque chose m'a echappé en lisant la doc ?

Merci d'avance pour vos lumieres.



Est-ce que l'utilisateur toto a bien été déloggué après la modif du
fichier sudoers ?

Jean-Luc

--=-FdCAmVq6VqTSDl2/BdtC
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQBDyQRIUdGGXzzGnNARAmyPAJ9krYWVZcqlEQwhOHBYNohNdwoolgCfd+L4
D5tO9JNR98JADpl7Hxladco Ã1M
-----END PGP SIGNATURE-----

--=-FdCAmVq6VqTSDl2/BdtC--


--
Pensez à lire la FAQ de la liste avant de poser une question :
http://wiki.debian.net/?DebianFrench

Pensez à rajouter le mot ``spam'' dans vos champs "From" et "Reply-To:"

To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Avatar
jerome
Essaie peut-être d'abord sans les alias ?


--
Pensez à lire la FAQ de la liste avant de poser une question :
http://wiki.debian.net/?DebianFrench

Pensez à rajouter le mot ``spam'' dans vos champs "From" et "Reply-To:"

To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Avatar
Bernard Mayer
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.


--
Pensez à lire la FAQ de la liste avant de poser une question :
http://wiki.debian.net/?DebianFrench

Pensez à rajouter le mot ``spam'' dans vos champs "From" et "Reply-To:"

To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact