To which group belongs "root"? Adding new user with root privileges? - Unix

This is a discussion on To which group belongs "root"? Adding new user with root privileges? - Unix ; I want to create a new user who should have (almost) the same privileges as root. Is there a (pre-defined) group which has more privileges than "other" but less the "root's" group? I need this for the user add command ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: To which group belongs "root"? Adding new user with root privileges?

  1. To which group belongs "root"? Adding new user with root privileges?

    I want to create a new user who should have (almost) the same privileges as root.
    Is there a (pre-defined) group which has more privileges than "other" but less
    the "root's" group? I need this for the user add command and the " -g " option.

    If there is no such group I am willing to create a second co-root:

    What is the group to which "root" belong?

    Thank you
    Matthew

  2. Re: To which group belongs "root"? Adding new user with root privileges?

    At 23 Apr 2008 11:51:31 GMT kmlincoln100@hotmail.com (Matthew Lincoln) wrote:

    >
    > I want to create a new user who should have (almost) the same privileges as root.
    > Is there a (pre-defined) group which has more privileges than "other" but less
    > the "root's" group? I need this for the user add command and the " -g " option.
    >
    > If there is no such group I am willing to create a second co-root:
    >
    > What is the group to which "root" belong?


    You should not be doing this.

    Use sudo. Visit

    http://www.deepsoft.com/Articles/Sho...rticle-2.ahtml

    For a more in-depth discussion.

    >
    > Thank you
    > Matthew
    >


    --
    Robert Heller -- Get the Deepwoods Software FireFox Toolbar!
    Deepwoods Software -- Linux Installation and Administration
    http://www.deepsoft.com/ -- Web Hosting, with CGI and Database
    heller@deepsoft.com -- Contract Programming: C/C++, Tcl/Tk


  3. Re: To which group belongs "root"? Adding new user with root privileges?

    kmlincoln100@hotmail.com (Matthew Lincoln) writes:

    > I want to create a new user who should have (almost) the same privileges as root.
    > Is there a (pre-defined) group which has more privileges than "other" but less
    > the "root's" group? I need this for the user add command and the "
    > -g " option.


    In ubuntu Linux anyway (it's what I have handy right now), root's
    primary group is group 0, which maps to group root:

    $ grep root /etc/passwd
    root:x:0:0:root:/root:/bin/bash

    $ grep :0: /etc/group
    root:x:0:

    But:
    o Your milage may vary based on flavor of *nix and maybe Linux
    distribution
    o and this probably isn't the best tree to be barking up to solve
    your problem.

    However:
    putting the user in group admin and using sudo will probably
    be what you want.

    > If there is no such group I am willing to create a second co-root:
    >
    > What is the group to which "root" belong?


    As another poster stated, you're trying to reinvent a wheel that's
    been very well invented.

    sudo is the right way to handle this and is quick to set up.

    In Ubuntu anyway, if you put the user account you want to be "co root"
    into the admin group, by default, /etc/sudoers is configured to allow
    that individual to execute any command as root simply by prepending
    the command with "sudo". sudo will prompt for that user's password
    for verification, then will execute the command as root.

    # /etc/sudoers
    #
    # This file MUST be edited with the 'visudo' command as root.
    #
    # See the man page for details on how to write a sudoers file.
    # Host alias specification

    # User alias specification

    # Cmnd alias specification

    # Defaults

    Defaults !lecture,tty_tickets,!fqdn

    # User privilege specification
    root ALL=(ALL) ALL

    # Members of the admin group may gain root privileges
    %admin ALL=(ALL) ALL


    Best Regards,
    --
    Todd H.
    http://www.toddh.net/

+ Reply to Thread