Go Back   Linux Forums by TotalPenguin! Get linux Help! > Linux > Linux Web Server

Linux Web Server Web Server help and support (including cpanel, whm, plesk, etc.)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-27-2008, 02:56 PM
Senior Member
 
Join Date: Jan 2007
Posts: 133
Wanch is on a distinguished road
Default User Group?

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

Sponsored Links
  #2 (permalink)  
Old 06-29-2008, 06:38 PM
Member
 
Join Date: Jun 2008
Posts: 54
LissaValerian is on a distinguished road
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
Reply With Quote
  #3 (permalink)  
Old 06-29-2008, 11:37 PM
Off Off is offline
Member
 
Join Date: Feb 2008
Posts: 60
Off is on a distinguished road
Default

You can also do it via useradd can't you?
Reply With Quote
  #4 (permalink)  
Old 06-30-2008, 12:49 AM
Member
 
Join Date: Jun 2008
Posts: 54
LissaValerian is on a distinguished road
Default

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
Reply With Quote
  #5 (permalink)  
Old 06-30-2008, 01:22 PM
Senior Member
 
Join Date: Jan 2007
Posts: 133
Wanch is on a distinguished road
Default

usermod works. I was looking in /usr/sbin/ and noticed a "lusermod". What is that?
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 06-30-2008, 02:07 PM
Member
 
Join Date: Jun 2008
Posts: 54
LissaValerian is on a distinguished road
Default

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.
Reply With Quote
  #7 (permalink)  
Old 07-04-2008, 02:37 PM
Senior Member
 
Join Date: Jan 2007
Posts: 133
Wanch is on a distinguished road
Default

hmm, interesting. I wonder if there is any difference when using either one. I'm going to give it a try and excellent information!!!
Reply With Quote
  #8 (permalink)  
Old 10-02-2008, 12:11 PM
Junior Member
 
Join Date: Oct 2008
Posts: 3
prags is on a distinguished road
Default

how to maintain user groups in it.
Reply With Quote
Reply

Tags
user group

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove User Password Hektor Linux Security 8 06-24-2008 02:12 PM
Another user to WHM? Wanch Linux Web Server 3 05-19-2008 02:47 PM
Last Login of User Pan Linux General 2 03-24-2008 09:23 PM
Add user to group in Linux erik Linux Applications 1 10-18-2007 03:38 PM
Wheel Group? Pan Linux Security 1 07-05-2007 03:24 AM


All times are GMT. The time now is 01:44 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.