Re: sudo : cannot connect to X server
Frédéric Bothamy a écrit :
> Si je comprends bien la page de manuel de sudoers, env_check sert à
> définir les variables d'environnement à vérifier et éventuellement
> supprimer (pour les valeurs de variables contenant un % ou un /). Pour
> définir celles à conserver, il faut utiliser env_keep (et env_delete
> pour celles à supprimer inconditionnellement).
en modifiant
Defaults env_check+="HOME DISPLAY XAUTHORITY"
en
Defaults env_keep+="HOME DISPLAY XAUTHORITY"
je n'ai plus qu'un message d'erreur :
christian@mephisto:~$ sudo synaptic
(synaptic:3615): Gtk-WARNING **: cannot open display:
> Une question : si tu te connectes en tant que root et que tu exécute
> "sudo -V", qu'est-ce qui s'affiche ?
Sudo version 1.6.8p7
Authentication methods: 'pam'
Syslog facility if syslog is being used for logging: authpriv
Syslog priority to use when user authenticates successfully: notice
Syslog priority to use when user authenticates unsuccessfully: alert
Send mail if the user is not in sudoers
Lecture user the first time they run sudo
Require users to authenticate by default
Root may run sudo
Allow some information gathering to give useful error messages
Require fully-qualified hostnames in the sudoers file
Visudo will honor the EDITOR environment variable
Set the LOGNAME and USER environment variables
Length at which to wrap log file lines (0 for no wrap): 80
Authentication timestamp timeout: 15 minutes
Password prompt timeout: 0 minutes
Number of tries to enter a password: 3
Umask to use or 0777 to use user's: 022
Path to mail program: /usr/sbin/sendmail
Flags for mail program: -t
Address to send mail to: root
Subject line for mail messages: *** SECURITY information for %h ***
Incorrect password message: Sorry, try again.
Path to authentication timestamp dir: /var/run/sudo
Users in this group are exempt from password and PATH requirements: sudo
Default password prompt: Password:
Default user to run commands as: root
Path to the editor for use by visudo: /usr/bin/editor
When to require a password for 'list' pseudocommand: any
When to require a password for 'verify' pseudocommand: all
File containing dummy exec functions: /usr/libexec/sudo_noexec.so
Environment variables to check for sanity:
TERM
LANGUAGE
LANG
LC_*
Environment variables to remove:
BASH_ENV
ENV
TERMCAP
TERMPATH
TERMINFO_DIRS
TERMINFO
_RLD*
LD_*
PATH_LOCALE
NLSPATH
HOSTALIASES
RES_OPTIONS
LOCALDOMAIN
PS4
SHELLOPTS
CDPATH
IFS
Local IP address and netmask pairs:
192.168.1.64 / 0xffffff00
Merci
Méph'
Reply to: