Solved

Linux Command line Beginner question

Posted on 2013-01-30
3
453 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!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

816 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now