Results 1 to 4 of 4

Thread: Allow user to run zypper without root password.

  1. #1
    Join Date
    Jul 2008
    Location
    San Diego, CA
    Posts
    193

    Default Allow user to run zypper without root password.

    I want to run zypper without being asked for the root password. So I added the commands to the sudoers file:

    Code:
    # User alias specification
    User_Alias      ADMIN = XXXX #note: this is not real username.
    
    # User privilege specification
    root    ALL = (ALL) ALL
    ADMIN   ALL =  NOPASSWD:/usr/sbin/vpnc ,/usr/sbin/vpnc-disconnect ,/usr/bin/zypper ref ,/usr/bin/zypper up
    But I'm still being asked for password. I should note the the vpnc commmand is working as expected. Any thoughts on why this is not working?

    Thanks.

  2. #2
    Chill Out NNTP User

    Default Re: Allow user to run zypper without root password.

    On Thu, 22 Apr 2010 18:46:01 +0000, ccin1492 wrote for a reply:

    > I want to run zypper without being asked for the root password. So I
    > added the commands to the sudoers file:
    >
    >
    > Code:
    > --------------------
    > # User alias specification
    > User_Alias ADMIN = XXXX #note: this is not real username.
    >
    > # User privilege specification
    > root ALL = (ALL) ALL
    > ADMIN ALL = NOPASSWD:/usr/sbin/vpnc ,/usr/sbin/vpnc-disconnect
    > ,/usr/bin/zypper ref ,/usr/bin/zypper up
    > --------------------
    >
    >
    > But I'm still being asked for password. I should note the the vpnc
    > commmand is working as expected. Any thoughts on why this is not
    > working?
    >
    > Thanks.


    Code:
    --------------------
    # User alias specification
    # User_Alias ADMIN = XXXX #note: this is not real username.

    # User privilege specification
    root ALL = (ALL) ALL
    XXXX ALL = NOPASSWD: (/usr/sbin/vpnc ,/usr/sbin/vpnc-disconnect
    ,/usr/bin/zypper re ,/usr/bin/zypper up)
    --------------------



    --
    Chillingout@opensuse.forum

  3. #3
    Join Date
    Jul 2008
    Location
    San Diego, CA
    Posts
    193

    Default Re: Allow user to run zypper without root password.

    Ok, problem solved: I'm an idiot!

    I was forgetting to put sudo in front of the command.

    I'm going back to bed...

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Allow user to run zypper without root password.

    Works for me. I put /usr/bin/zypper ref into that file like you did and then I could do:

    sudo zypper ref

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •