Solved

Linux Command line Beginner question

Posted on 2013-01-30
3
458 Views
Last Modified: 2013-02-14
How do I:

see what groups a user is part of from the commmand line
add another user to the same group from the command line
0
Comment
Question by:Jack_son_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Assisted Solution

by:jimminy_ebay
jimminy_ebay earned 167 total points
ID: 38836632
0
 
LVL 31

Assisted Solution

by:farzanj
farzanj earned 166 total points
ID: 38836840
As said above, you can see all the group information by issuing command

id <userid>

If you have existing user and you want to add group to the profile you can do
usermod -g <primary group> -G <secondary groups separated by commas>

Make sure you give all the group names, even exiting groups
0
 
LVL 1

Accepted Solution

by:
OHUPE earned 167 total points
ID: 38840059
An alternative way is to type :

groups username

to check out what groups username is part of.
And type :

gpasswd -a username group

to add username to the group group
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question