Results 1 to 4 of 4

Thread: how to list of Groups on ubuntu server

  1. #1
    Join Date
    Sep 2010
    Beans
    1

    how to list of Groups on ubuntu server

    how to list of Groups on ubuntu server,


    and how to create user on ubuntu server

  2. #2
    Join Date
    Jul 2006
    Location
    Los Angeles
    Beans
    1,310
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: how to list of Groups on ubuntu server

    Code:
    cat /etc/group
    will list all the groups, including ones used only by the system. Just typing
    Code:
    groups
    will list all the groups of which the current user is a member. To add a user use
    Code:
    sudo useradd name
    To add a user to a specific group use
    Code:
    sudo usermod -G name-of-group -a 'name-of-user'
    For more information on all these -- and it's really a good idea to make sure you know what you're doing before doing system-level commands -- you can type
    Code:
    info command-name
    or
    Code:
    man command-name
    For instance "man useradd".

  3. #3
    Join Date
    Sep 2012
    Beans
    2

    Re: how to list of Groups on ubuntu server

    I did this without adding the -a option so now I no longer have root access, and oddly enough the admin group is no longer in the /etc/group file. Does anyone know how to recover from such a scenario? The link:
    http://ccollins.wordpress.com/2007/0...ubuntu-groups/

    talks about a similar situation but does not talk about how to add the admin group back into the /etc/group file. It's easy to edit back in but what number do you assign it?

  4. #4
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: how to list of Groups on ubuntu server

    This is a really old thread. Closed. Please start a new thread.
    Last edited by matt_symes; September 20th, 2012 at 05:07 PM.
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

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
  •