Operating System - HP-UX
1833820 Members
2471 Online
110063 Solutions
New Discussion

Add a user to a group from CLI

 
SOLVED
Go to solution
Enrico Venturi
Super Advisor

Add a user to a group from CLI

Hi colleagues,
which is the command to add a user to a group from the command line?

thanks
Enrico
3 REPLIES 3
Wouter Jagers
Honored Contributor
Solution

Re: Add a user to a group from CLI

Hi,

You can edit /etc/groups or use the 'usermod' command.

The usermod command takes the options -g (for the primary group) and -G (for extra groups).

Cheers,
Wout
an engineer's aim in a discussion is not to persuade, but to clarify.
Robert-Jan Goossens_1
Honored Contributor

Re: Add a user to a group from CLI

Hi Enrico,

# usermod -G xxx username

Regards,
Robert-Jan
Enrico Venturi
Super Advisor

Re: Add a user to a group from CLI

.