IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

RedHat / CentOS / Fedora Discussion :

Probleme sur mon fichier /etc/sudoers


Sujet :

RedHat / CentOS / Fedora

  1. #1
    Membre du Club
    Inscrit en
    Septembre 2008
    Messages
    99
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 99
    Points : 59
    Points
    59
    Par défaut Probleme sur mon fichier /etc/sudoers
    Bonjour,

    Qd je teste cette commande pour mon serveur backupPC
    /usr/bin/sudo -u backuppc /usr/local/nagios/libexec/check_backuppc -v

    j'ai le message suivant:
    >>> sudoers file: syntax error, line 92 <<<
    sudo: parse error in /etc/sudoers near line 92

    J'ai essayé de decommanté la ligne 92 et autre, mais tjrs pareil, ci-joint mon fichier sudoers:
    # Sudoers allows particular users to run various commands as
    2 ## the root user, without needing the root password.
    3 ##
    4 ## Examples are provided at the bottom of the file for collections
    5 ## of related commands, which can then be delegated out to particular
    6 ## users or groups.
    7 ##
    8 ## This file must be edited with the 'visudo' command.
    9
    10 ## Host Aliases
    11 ## Groups of machines. You may prefer to use hostnames (perhap using
    12 ## wildcards for entire domains) or IP addresses instead.
    13 # Host_Alias FILESERVERS = fs1, fs2
    14 # Host_Alias MAILSERVERS = smtp, smtp2
    15
    16 ## User Aliases
    17 ## These aren't often necessary, as you can use regular groups
    18 ## (ie, from files, LDAP, NIS, etc) in this file - just use %groupname
    19 ## rather than USERALIAS
    20 # User_Alias ADMINS = jsmith, mikem
    21
    22
    23 ## Command Aliases
    24 ## These are groups of related commands...
    25
    26 ## Networking
    27 Cmnd_Alias NETWORKING = /sbin/route, /sbin/ifconfig, /bin/ping, /sbin/dhclient, /usr/bin/net, /sbin/iptables, /usr/bi n/rfcomm, /usr/bin/wvdial, /sbin/iwconfig, /sbin/mii-tool
    28
    29 ## Installation and management of software
    30 Cmnd_Alias SOFTWARE = /bin/rpm, /usr/bin/up2date, /usr/bin/yum
    31
    32 ## Services
    33 Cmnd_Alias SERVICES = /sbin/service, /sbin/chkconfig
    34
    35 ## Updating the locate database
    36 Cmnd_Alias LOCATE = /usr/sbin/updatedb
    37
    38 ## Storage
    39 Cmnd_Alias STORAGE = /sbin/fdisk, /sbin/sfdisk, /sbin/parted, /sbin/partprobe, /bin/mount, /bin/umount
    40
    41 ## Delegating permissions
    42 Cmnd_Alias DELEGATING = /usr/sbin/visudo, /bin/chown, /bin/chmod, /bin/chgrp
    43
    44 ## Processes
    45 Cmnd_Alias PROCESSES = /bin/nice, /bin/kill, /usr/bin/kill, /usr/bin/killall
    46
    47 ## Drivers
    48 Cmnd_Alias DRIVERS = /sbin/modprobe
    49
    50 # Defaults specification
    51
    52 #
    53 # Disable "ssh hostname sudo <cmd>", because it will show the password in clear.
    54 # You have to run "ssh -t hostname sudo <cmd>".
    55 #
    56 Defaults requiretty
    57
    58 Defaults env_reset
    59 Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR \
    60 LS_COLORS MAIL PS1 PS2 QTDIR USERNAME \
    61 LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION \
    62 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC \
    63 LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS \
    64 _XKB_CHARSET XAUTHORITY"
    65
    66 ## Next comes the main part: which users can run what software on
    67 ## which machines (the sudoers file can be shared between multiple
    68 ## systems).
    69 ## Syntax:
    70 ##
    71 ## user MACHINE=COMMANDS
    72 ##
    73 ## The COMMANDS section may have other options added to it.
    74 ##
    75 ## Allow root to run any commands anywhere
    76 root ALL=(ALL) ALL
    77 nagios ALL = (backuppc) NOPASSWD: /usr/local/nagios/libexec/check_backuppc
    78 ## Allows members of the 'sys' group to run networking, software,
    79 ## service management apps and more.
    80 # %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS
    81 ##
    82 ## Allows people in group wheel to run all commands
    83 # %wheel ALL=(ALL) ALL
    84 ##
    85 ## Same thing without a password
    86 # %wheel ALL=(ALL) NOPASSWD: ALL
    87 ##
    88 ## Allows members of the users group to mount and unmount the
    89 ## cdrom as root
    90 %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
    91 #
    92 ## Allows members of the users group to shutdown this system
    93 %users localhost=/sbin/shutdown -h now
    94 ##
    95 # Add by Centreon installation script
    96 User_Alias CENTREON= apache
    97 backuppc
    98 ## Nagios Restart
    99 CENTREON ALL = NOPASSWD: /etc/init.d/nagios restart
    100 ## Nagios reload
    101 CENTREON ALL = NOPASSWD: /etc/init.d/nagios reload
    102 ## Snmptrapd Restart
    103 CENTREON ALL = NOPASSWD: /etc/init.d/snmptrapd restart
    104

  2. #2
    Membre du Club
    Inscrit en
    Septembre 2008
    Messages
    99
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 99
    Points : 59
    Points
    59
    Par défaut pb résolu
    sur la ligne 97, j'ai un backuppc, ligne fausse, en décommentant cette ligne, je suis arrivé à executer ma commande.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. petit probleme sur mon code
    Par MORPHEUS50 dans le forum Balisage (X)HTML et validation W3C
    Réponses: 2
    Dernier message: 13/05/2007, 18h16
  2. [XSLT] une question sur mon fichier XML
    Par delma dans le forum XSL/XSLT/XPATH
    Réponses: 6
    Dernier message: 20/10/2006, 17h08
  3. nouveaux problemes sur mon WebBrowser
    Par kor6k dans le forum MFC
    Réponses: 5
    Dernier message: 18/09/2006, 10h04
  4. avie et probleme sur mon site
    Par coucou449 dans le forum Balisage (X)HTML et validation W3C
    Réponses: 3
    Dernier message: 23/12/2005, 09h34
  5. [FLASH MX] Probleme sur mon site....!!
    Par thewill dans le forum Flash
    Réponses: 2
    Dernier message: 07/04/2005, 12h11

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo