Bruach mal hilfe bei sudo

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Bruach mal hilfe bei sudo

    Code:
    # 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
    
    User_Alias ENSIM = apache
    
    # Cmnd alias specification
    
    Cmnd_Alias ENSIM_CMD = /usr/local/bin/AddVirtDomain
    
    # Defaults specification
    
    # User privilege specification
    root	ALL=(ALL) ALL
    ENSIM ALL = ENSIM_CMD
    
    
    # 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
    Jetzt habe ich das in der Manpage sudoers gelesen:
    rootpw If set, sudo will prompt for the root password instead of the password of the invoking

    user. This flag is off by default.

    runaspw If set, sudo will prompt for the password of the user defined by the runas_default option

    (defaults to root) instead of the password of the invoking user. This flag is off by

    default.

    targetpw If set, sudo will prompt for the password of the user specified by the -u flag (defaults

    to root) instead of the password of the invoking user. This flag is off by default.
    Wie, was und wo muss ich jetzt einstellen das ich das Passwort nicht angeben muss?
    *winks*
    Gilbert
    ------------------------------------------------
    Hilfe für eine Vielzahl von Problemen!!!
    http://www.1st-rootserver.de/

  • #2
    Und das habe ich noch dazu gefunden
    NOPASSWD and PASSWD
    By default, sudo requires that a user authenticate him or herself before running a command. This behavior can be modified via the NOPASSWD tag. Like a Runas_Spec, the NOPASSWD tag sets a default for the commands that follow it in the Cmnd_Spec_List. Conversely, the PASSWD tag can be used to reverse things. For example:

    ray rushmore = NOPASSWD: /bin/kill, /bin/ls, /usr/bin/lprm
    would allow the user ray to run /bin/kill, /bin/ls, and /usr/bin/lprm as root on the machine rushmore as root without authenticating himself. If we only want ray to be able to run /bin/kill without a password the entry would be:

    ray rushmore = NOPASSWD: /bin/kill, PASSWD: /bin/ls, /usr/bin/lprm
    Note, however, that the PASSWD tag has no effect on users who are in the group specified by the exempt_group option.

    By default, if the NOPASSWD tag is applied to any of the entries for a user on the current host, he or she will be able to run sudo -l without a password. Additionally, a user may only run sudo -v without a password if the NOPASSWD tag is present for all a user's entries that pertain to the current host. This behavior may be overridden via the verifypw and listpw options.
    Nur wie, was und wo einbauen?
    *winks*
    Gilbert
    ------------------------------------------------
    Hilfe für eine Vielzahl von Problemen!!!
    http://www.1st-rootserver.de/

    Kommentar


    • #3
      Habe es die Nacht hinbekommen. Nachdem ich zuzählige englische Handbücher über Sudo gelesen habe, habe ich auch den Fehler gefunde.

      [color=red]Das sudoers-File darf/kann nur mit Visudo bearbeitet werden. Und das auch nur als root!!!![/color]

      Nach dem ich dann auch noch den Fehler gemacht habe, den Befehl als Alias zu schreiben anstatt ihn auszuschreiben geht es jetzt!.
      *freu*
      *winks*
      Gilbert
      ------------------------------------------------
      Hilfe für eine Vielzahl von Problemen!!!
      http://www.1st-rootserver.de/

      Kommentar

      Lädt...
      X