LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-13-2004, 11:39 AM   #1
feetyouwell
Member
 
Registered: Dec 2003
Location: NC, US
Distribution: Novell Linux Eval (2.6.5)
Posts: 240

Rep: Reputation: 30
Question how to add a user to a certain group?


I edit the file /etc/group and put the user i want in the wheel group, save & exit, when i open a terminal as the user and type in "groups", the group information "wheel" didn't show up on the screen.

So then I edit the file /etc/gshadow and edit the line

wheel:*:root:<user_name>,

still when i type "groups", I didn't see wheel there. What did i do wrong?
Also, what's the best way to add a user to a group without using gui.
 
Old 01-13-2004, 11:44 AM   #2
wapcaplet
Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
The method I use is the 'usermod' command. The '-G' option is used to list groups that the user should be in. Any groups that are not listed will be removed, though, so if you want to add 'wheel' to an existing user's groups, run this command:

usermod -G `groups username` wheel username

Those are left-quote marks; they cause the output of running "groups username" to be added to the list.

Sometimes you may have to completely log out and log back in for group settings to take effect; I think this is necessary if you've run X from a console with 'startx', for example.
 
Old 01-13-2004, 11:56 AM   #3
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
This sounds like an example of Red Hat making something way overly complicated. On all my systems you simply just add the user to the list in the /etc/group file and that is it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to list user in Linux box, add an user to a group! steady_lfcfan Linux - Newbie 12 01-27-2013 01:14 PM
how to add a user to a new group? emanresu Linux - Newbie 5 11-21-2005 08:18 AM
add user to the group ashley75 Linux - General 4 03-30-2005 02:42 PM
how do i add user to a group jogurt666 Linux - General 2 04-02-2004 10:05 PM
how can i add a user to a group? doublefailure Linux - General 14 07-10-2002 11:11 AM


All times are GMT -5. The time now is 02:00 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration