Create the group with:
groupadd managers
Add david to the new group with:
usermod -G managers
david
The "-G" is the option to add supplemental groups to a user. Note
that "david" is still in his original "david" group (and that is his PRIMARY
group).
Check the /etc/passwd and /etc/group files to make sure that it did what
you want.
Charlie
i'm stuck with usermod and groupmod. if you
have a user set up and want to change the group that they belong
to?
First you would create the group. That has
been done checked /etc/group file and the group is there. "All from
root". Let's say the user is david and his current group is david.
I create a group called mangers. To change david to the group mangers
would it be usermod -G david,mangers does not seem to work or groupmod -g
david,mangers also does not seem to work. I'm lost as to how to do this
Help
|