Closed Thread
Results 1 to 8 of 8

Thread: User Group?

  1. #1
    Wanch Guest

    User Group?

    How do I add a user to a group from the console?

  2. CODECALL Circuit advertisement

     
  3. #2
    LissaValerian is offline Learning Programmer
    Join Date
    Jun 2008
    Posts
    54
    Rep Power
    0

    Smile

    You can add the user to the specific group directly by editing /etc/group.

    or, via commandline:

    usermod -G <groupname> <username>

    (without the <>'s) This adds an already existing user to another group.

    ~LV

  4. #3
    Off
    Off is offline Learning Programmer
    Join Date
    Feb 2008
    Posts
    83
    Rep Power
    0
    You can also do it via useradd can't you?

  5. #4
    LissaValerian is offline Learning Programmer
    Join Date
    Jun 2008
    Posts
    54
    Rep Power
    0
    Quote Originally Posted by Off View Post
    You can also do it via useradd can't you?
    Yes, if the user doesn't already exist, you can assign a new user to a group via the useradd. but if the user already exists, then use the usermod cmd.

    ~LV

  6. #5
    Wanch Guest
    usermod works. I was looking in /usr/sbin/ and noticed a "lusermod". What is that?

  7. #6
    LissaValerian is offline Learning Programmer
    Join Date
    Jun 2008
    Posts
    54
    Rep Power
    0
    Quote Originally Posted by Wanch View Post
    usermod works. I was looking in /usr/sbin/ and noticed a "lusermod". What is that?
    Thats interesting, I haven't used that, I see it on my system, but theres no man page for it so I had to look it up. (I LOVE to look stuff up!)

    usermod

    lusermod


    It looks like lusermod comes from this package (on my system) - libuser-0.52 - which apparently is an account maintenance package whereas usermod comes from a package called shadow-utils.

    So they're basically two different packages that do ... much the same thing?

    Leave it to Linux to give you many different ways to skin a cat. (ugh, isn't that a horrible phrase? LOL).

    Oh, except, in lusermod, I didn't see the -G option or anything comparable to it. Just the -g option for changing groups, but no -G for ADDING groups.

    I usually just edit /etc/group anyways, LOL.

  8. #7
    Wanch Guest
    hmm, interesting. I wonder if there is any difference when using either one. I'm going to give it a try and excellent information!!!

  9. #8
    prags is offline Newbie
    Join Date
    Oct 2008
    Posts
    3
    Rep Power
    0
    how to maintain user groups in it.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Join the .NET group!
    By cdg10620 in forum ASP, ASP.NET and Coldfusion
    Replies: 5
    Last Post: 04-06-2010, 09:41 AM
  2. Add user to group
    By mop in forum Linux/Unix General
    Replies: 7
    Last Post: 11-29-2008, 01:52 AM
  3. Greetings from F&H Solutions Group
    By FHSolutionsGroup in forum Introductions
    Replies: 1
    Last Post: 10-19-2007, 01:06 PM
  4. Add user to group in Linux
    By erik in forum Linux Applications
    Replies: 1
    Last Post: 10-18-2007, 07:38 AM

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