how to add a user to a new group?
this is really a newbie question, but how do I add a user to a new group? For example, I have this user account "john" that is already part of the following groups:
users adm audio wheel
now, I need to add him into the group "video". But if I use "usermod -G", I need to retype all the existing groups. Is there an easier way to just add the new group on top of the existing one? Thanks.
From the ( man usermod ), try it with -a
-G group1[ ,group2,..., [groupN]]]
A list of supplementary groups which the user is also a member of.
Each group is separated from the next by a comma, with no intervening
whitespace. The groups are subject to the same restrictions as the
group given with the -g option. If the user is currently a member of
a group which is not listed, the user will be removed from the group.
This behaviour can be changed via -a option, which appends user to
the current supplementary group list.
Re: how to add a user to a new group?
first, create the video group
#adduser emanresu video
the -a option doesn't seem to be available on my machine.
You could edit the /etc/group file. Add the user to the end of the line that begins with the the word "video".
here is the solution:
|All times are GMT -5. The time now is 05:04 AM.|