Solved

Linux Command line Beginner question

Posted on 2013-01-30
3
454 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_
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
awk file 6 79
awk to variable in bash 2 76
Quickest way to query Windows Event ID from a Linux Device 3 53
How to check currently configured static routes on CentOS 7? 1 51
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

820 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