Results 1 to 5 of 5

Thread: /etc/sudoers and https://en.opensuse.org/SDB:Administer_with_sudo free of examples

  1. #1
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    1,700

    Default /etc/sudoers and https://en.opensuse.org/SDB:Administer_with_sudo free of examples

    I couldn't remember if exists a best place to ask this, and didn't find one when looking.

    I installed 15.1 on a brother's PC, skipping user creation until such time as I could consult with him on the subject of passwd. Since having created one, I want to enable sudo for the created normal user account, but found no unambiguous examples of what to do in the file, or at $SUBJECT's URL, in YaST2, or in the sudoers man page.

    Will someone please provide a clear example of how to add a username to /etc/sudoers, and clarify the SDB
    Reg. Linux User #211409 *** multibooting since 1992
    Primary: 42.3,TW,15.0 & 13.1 on Haswell w/ RAID
    Secondary: eComStation (OS/2)&42.3 on 965P/Radeon
    Tertiary: TW,15.0,42.3,Fedora,Debian,more on Kaby Lake,Q45,Q43,G41,G3X,965G,Cedar,Caicos,Oland,GT218&&&

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,878
    Blog Entries
    15

    Default Re: /etc/sudoers and https://en.opensuse.org/SDB:Administer_with_sudo free of examples

    Hi
    Don't you just add to the wheel group?

    The only one I use for myself is building rpms with osc/sudo which is....

    Code:
    <username> ALL = NOPASSWD: /usr/bin/build
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,643
    Blog Entries
    3

    Default Re: /etc/sudoers and https://en.opensuse.org/SDB:Administer_with_sudo free of examples

    Quote Originally Posted by mrmazda View Post
    Will someone please provide a clear example of how to add a username to /etc/sudoers, and clarify the SDB
    I don't normally use "sudo".

    I think you need to uncomment this line:
    Code:
    ## Uncomment to allow members of group wheel to execute any command
    # %wheel ALL=(ALL) ALL
    Make that the second of those two lines.

    Then you add the user to the "wheel" group.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  4. #4
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    1,700

    Default Re: /etc/sudoers and https://en.opensuse.org/SDB:Administer_with_sudo free of examples

    Turns out I don't understand the purpose of sudoers. Here on brother's 15.1/Plasma PC, simply sudo fdisk -l and typing passwd in Konsole is enough as normal user, without having more than viewed /etc/sudoers.
    Reg. Linux User #211409 *** multibooting since 1992
    Primary: 42.3,TW,15.0 & 13.1 on Haswell w/ RAID
    Secondary: eComStation (OS/2)&42.3 on 965P/Radeon
    Tertiary: TW,15.0,42.3,Fedora,Debian,more on Kaby Lake,Q45,Q43,G41,G3X,965G,Cedar,Caicos,Oland,GT218&&&

  5. #5
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,643
    Blog Entries
    3

    Default Re: /etc/sudoers and https://en.opensuse.org/SDB:Administer_with_sudo free of examples

    Quote Originally Posted by mrmazda View Post
    Turns out I don't understand the purpose of sudoers. Here on brother's 15.1/Plasma PC, simply sudo fdisk -l and typing passwd in Konsole is enough as normal user, without having more than viewed /etc/sudoers.
    For openSUSE, you usually don't need to change "sudoers". Anyone can use "sudo" provided that he/she knows the root password.

    If you uncomment that line about "wheel", then anyone in the "wheel" group can use "sudo" with their own password (no need for the root password).

    I have experimented with adding: DISPLAY XAUTHORITY SSH_AUTH_SOCK
    to the list of environment variables passed through. That allows me to use GUI applications with "sudo" and to use my public key (registered with "ssh-agent" to doing "rsync" between systems as root. But, except for the testing, I'll probably never use it. It's not my normal way of doing administrative things.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

Posting Permissions

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