Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SUDO]Impossible de lancer sudo (Non Resolut)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
zeuss1414
Guru
Guru


Joined: 23 Mar 2004
Posts: 490

PostPosted: Tue Mar 23, 2004 7:38 pm    Post subject: [SUDO]Impossible de lancer sudo (Non Resolut) Reply with quote

Je vient d'essayer de configurer sudo avec l'aide des expliquation de lea_linux.

voici mon fichier sudoers :


# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#


# Host alias specification
Host_Alias LOCAL_HOST = localhost, 127.0.0.1, gen

Runas_Alias SU = root

# User alias specification
User_Alias STD_USER = toto
# Cmnd alias specification
Cmnd_Alias STOPPC = /sbin/halt, /sbin/reboot
Cmnd_Alias NET = /sbin/ifconfig

# Defaults specification

# User privilege specification
root ALL=(ALL) ALL
STD_USER LOCAL_HOST = (SU)NOPASSWD: NET



C juste pour tester le fonctionnement de sudo mais ca marche deja pas :(

Voici le message d'erreur :
toto@gen toto $ sudo ifconfig
Sorry, user toto is not allowed to execute 'ifconfig' as root on gen.

Je vois pas de quoi ca peux venir et j'espere que vous pourrez m'aider.
Merci d'avance
Zeuss14
Back to top
View user's profile Send private message
sargis
n00b
n00b


Joined: 24 Feb 2004
Posts: 48

PostPosted: Tue Mar 23, 2004 7:47 pm    Post subject: Reply with quote

Que se passe t-il si tu fait sudo /sbin/ifconfig ?
Back to top
View user's profile Send private message
sargis
n00b
n00b


Joined: 24 Feb 2004
Posts: 48

PostPosted: Tue Mar 23, 2004 7:56 pm    Post subject: Reply with quote

Je crois que j'ai dis une bétise, mais bon.
Il me semble que ifconfig est utilisable en tant que simple utilisateur. Juste que le dossier /sbin n'est pas dans le $PATH des utilisateurs. Tu peux juste faire alias ifconfig='/sbin/ifconfig'
Mais bon, ça ne résoud pas le problème de sudo.
Back to top
View user's profile Send private message
sireyessire
Advocate
Advocate


Joined: 20 Mar 2003
Posts: 2991
Location: back in Paris, France

PostPosted: Tue Mar 23, 2004 7:57 pm    Post subject: Reply with quote

va voir ici https://forums.gentoo.org/viewtopic.php?t=128251
_________________
I never think of the future. It comes soon enough.
Albert Einstein

Try simpler first
Shockley
Back to top
View user's profile Send private message
yuk159
Veteran
Veteran


Joined: 18 Apr 2003
Posts: 1803
Location: noumea ,nouvelle-caledonie

PostPosted: Tue Mar 23, 2004 8:13 pm    Post subject: Reply with quote

Voila ma config, tu y retrouve les meme choses que dans le lien donne par sireyessire.
Code:
# Permissions pour yuk
yuk Antares=NOPASSWD: /sbin/halt
yuk Antares=NOPASSWD: /sbin/reboot
yuk Antares=NOPASSWD: /usr/local/bin/logtai

_________________
The box said: "Requires Windows 98/2000/XP/NT, or better."
So, I installed LINUX!
Instagram
Back to top
View user's profile Send private message
zeuss1414
Guru
Guru


Joined: 23 Mar 2004
Posts: 490

PostPosted: Tue Mar 23, 2004 9:33 pm    Post subject: Reply with quote

J'ai testé le sudo /sbin/ifconfig et en fait la ca marche.

Donc il faut que je fasse un alias pour chaque commande ??? (un peu long je pense), ou est ce qu'il y a une autre methode ??? (mais la je c pas )
Back to top
View user's profile Send private message
yuk159
Veteran
Veteran


Joined: 18 Apr 2003
Posts: 1803
Location: noumea ,nouvelle-caledonie

PostPosted: Tue Mar 23, 2004 10:49 pm    Post subject: Reply with quote

L'alias est la seule methode que je vois, perso je les mets dans mon fichier ~/.bashrc comme suit.
Code:
alias reboot="sudo /sbin/reboot"
alias halt="sudo /sbin/halt"

Et voila c'est pris en compte au login
_________________
The box said: "Requires Windows 98/2000/XP/NT, or better."
So, I installed LINUX!
Instagram
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum