Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 463
  • Last Modified:

Linux Command line Beginner question

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
Jack_son_
Asked:
Jack_son_
3 Solutions
 
farzanjCommented:
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
 
OHUPECommented:
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now