Announcement

Collapse
No announcement yet.

Problem reloading Nagios: Sudoers?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem reloading Nagios: Sudoers?

    Hi,

    When I try to restart or reload nagios from the Oreon interface, I get the following in my apache error log:

    root's password:

    Here is my 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

    # User alias specification

    # Cmnd alias specification

    # Defaults specification

    # prevent environment variables from influencing programs in an
    # unexpected or harmful way (CVE-2005-2959, CVE-2005-4158,
    # CVE-2006-0151)
    Defaults always_set_home
    Defaults env_reset
    # In the default (unconfigured) configuration, sudo asks for the root password.
    # This allows use of an ordinary user account for administration of a freshly
    # installed system. When configuring sudo, delete the two
    # following lines:
    Defaults targetpw # ask for the password of the target user i.e. root
    ALL ALL=(ALL) ALL # WARNING! Only use this together with 'Defaults targetpw'!

    # Runas alias specification

    # User privilege specification
    root ALL=(ALL) ALL

    # Uncomment to allow people in group wheel to run all commands
    # %wheel ALL=(ALL) ALL

    # Same thing without a password
    # %wheel ALL=(ALL) NOPASSWD: ALL

    # Samples
    # %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
    # %users localhost=/sbin/shutdown -h now
    #Add by OREON installation script
    User_Alias OREON=wwwrun
    OREON ALL = (ALL) NOPASSWD: /etc/init.d/nagios restart
    OREON ALL = (ALL) NOPASSWD: /etc/init.d/nagios reload
    OREON ALL = (ALL) NOPASSWD: /etc/init.d/snmptrapd restart

    I'm running Oreon 1.4, fresh install

  • #2
    Hi,

    Change the three lines of Oreon into that style:
    OREON ALL = NOPASSWD: /etc/init.d/nagios reload

    That will work.
    Bye,

    Ira

    Comment


    • #3
      Didn't work

      Sorry, tried that as well, didn't work. I still get a root's password prompt in my apache error log.

      Is there anything that I'm missing?

      Comment


      • #4
        Bad setup

        Ends up that the init script path wasn't setup in oreon properly. The error in apache was a bit misleading...

        Just a suggestion, perhaps you could post the command being executed in the state section? This might help users catch mistakes. Just a thought.

        Thanks for you help!

        Comment

        Working...
        X