Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-29-2006, 09:33 PM
|
#1
|
|
LQ Newbie
Registered: May 2006
Posts: 11
Rep:
|
create user with secondary group
i just learn linux, i want to ask how to create an user with more than 1 secondary group?
thank for response
|
|
|
|
05-29-2006, 09:43 PM
|
#2
|
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 13.37
Posts: 4,082
Rep: 
|
Are you using the useradd command to create your users? If so, the -G switch is for specifying secondary groups. For example:
Code:
useradd -c "User Full Name" -g primarygroup -G secondgroup,thirdgroup -s /bin/bash username
Have a look at the man page for useradd for more info; man useradd
|
|
|
|
05-29-2006, 10:22 PM
|
#3
|
|
LQ Newbie
Registered: May 2006
Posts: 11
Original Poster
Rep:
|
if the question is create user jack with secondary group manager, sysadmin, admin and web dev could i use this command:
useradd -c jack -G manager,sysadmin,admin, webdev -s /bin/bash jack
|
|
|
|
05-29-2006, 10:24 PM
|
#4
|
|
LQ Newbie
Registered: May 2006
Posts: 11
Original Poster
Rep:
|
if the question is create user "jack" with secondary group manager, admin, sysadmin,webdev can i use this command:
useradd jack -G manager, admin, sysadmin, webdev -s /bin/bash jack
regard
levis
|
|
|
|
05-30-2006, 12:34 AM
|
#5
|
|
Member
Registered: May 2006
Posts: 141
Rep:
|
can you explain me what is creating user with secondary group
|
|
|
|
05-30-2006, 02:26 PM
|
#6
|
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 13.37
Posts: 4,082
Rep: 
|
Normally when you create a user they are also added to a group (their primary group) with the -g switch.
Secondary or supplementary groups are often used so that multiple users can access the same directories. They can also be used to provide access to devices (sound cards, cdroms, etc.).
For example, my home directory is owned by my user account and my primary group - there are no other members of the group that owns my home directory. However, I am also in a developers group (a secondary group) so that I can access the documentation the developers in my area use.
|
|
|
|
05-31-2006, 12:33 AM
|
#7
|
|
Member
Registered: May 2006
Posts: 141
Rep:
|
Thanks for your clarification
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:14 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|