Results 1 to 6 of 6

Thread: /etc/sudoers configuration

  1. #1
    Join Date
    Jul 2008
    Beans
    9

    Post /etc/sudoers configuration

    I'm attempting to set up sudo to do two things: Allow all network admins root access, and allow anyone on the system to mount and unmount network shares. The closest I've gotten to this working is here:

    Code:
    #Allow all users to mount filesystems
    ALL ALL=NOPASSWD: /bin/mount, /sbin/mount.cifs, /bin/umount
    
    #Allow all admins sudo access
    %DOMAIN\\admin_group ALL=(ALL) ALL
    The problem with this is that the previously listed line works, while the second doesn't. This happens when I switch their order as well. I need both parts working for linux to be usable in my workplace.

  2. #2
    Join Date
    Sep 2006
    Beans
    7,304
    Distro
    Lubuntu Development Release

    Re: /etc/sudoers configuration

    You need to put the actual name of your group after the %

    Code:
    %admin ALL=NOPASSWD: /bin/mount, /sbin/mount.cifs, /bin/umount
    Or are you trying to make this work with LDAP?

  3. #3
    Join Date
    Jul 2008
    Beans
    9

    Re: /etc/sudoers configuration

    Yeah, using LDAP. I don't have access to the server however, and it would be a hassle to get someone to add sudo LDAP support on the server.

  4. #4
    Join Date
    Dec 2009
    Location
    germany
    Beans
    1,020
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: /etc/sudoers configuration

    Quote Originally Posted by Ed54_3 View Post
    I'm attempting to set up sudo to do two things: Allow all network admins root access, and allow anyone on the system to mount and unmount network shares. The closest I've gotten to this working is here:

    Code:
    #Allow all users to mount filesystems
    ALL ALL=NOPASSWD: /bin/mount, /sbin/mount.cifs, /bin/umount
    
    #Allow all admins sudo access
    %DOMAIN\\admin_group ALL=(ALL) ALL
    The problem with this is that the previously listed line works, while the second doesn't. This happens when I switch their order as well. I need both parts working for linux to be usable in my workplace.
    by the side - in my opinion is
    ALL ALL=NOPASSWD: /bin/mount, /sbin/mount.cifs, /bin/umount

    audacious - precarious - hazardous
    "What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht

  5. #5
    Join Date
    Jul 2008
    Beans
    9

    Re: /etc/sudoers configuration

    You are right, this is perhaps insecure. Is there a better way of achieving the same result? This would also solve my problem since I would only need one line in /etc/sudoers then.

  6. #6
    Join Date
    Jul 2008
    Beans
    9

    Re: /etc/sudoers configuration

    I solved this issue by using an alias as follows:

    Code:
    #Cmnd alias specification
    Cmnd_Alias MOUNT_COMMANDS = /bin/mount, /sbin/mount.cifs, /bin/umount
    
    
    #Allow all network admins root access
    %DOMAIN\\admin_domain_group ALL=(ALL) ALL
    
    #Allow all non-privileged users permission to mount filesystems
    ALL ALL=NOPASSWD:MOUNT_COMMANDS
    I'm not entirely sure why this worked, and my previous attempt didn't, but my issue is resolved.

Tags for this Thread

Bookmarks

Posting Permissions

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