> with OS12.3 the syntax of usermod changed?
> Where is the option ‘List of groups the user should be removed from’
i do not have a 12.3 man here, so i am just asking:
does your “man usermod” not include something similar to this:
-R, --remove-from-group group,...
With this option a list of groups can be specified, from which the
user should be removed. Each group is separated from the next one
only by a comma, without whitespace.
**-R, --root** CHROOT_DIR
Apply changes in the CHROOT_DIR directory and use the configuration
files from the CHROOT_DIR directory.
Well, AFAIK usermod on openSUSE wasn’t quite standard regarding the command line options. Seems that got changed now.
Regarding the original question:
There still is a “primary group”, see option “-g”.
“-G” only changes the secondary (the manpage says “supplementary”) groups.
Not sure how you could remove a specific group now though.
You could list all other groups with “-G”. (groups not listed are removed)
Well, just found one:
Use gpasswd.
**NAME** gpasswd - administer /etc/group and /etc/gshadow
**SYNOPSIS**
**gpasswd** option] group
**DESCRIPTION**
The **gpasswd** command is used to administer /etc/group, and /etc/gshadow.
Every group can have administrators, members and a password.
...
**OPTIONS**
Except for the **-A** and **-M** options, the options cannot be combined.
The options which apply to the **gpasswd** command are:
**-a, --add** user
Add the user to the named group.
**-d, --delete** user
Remove the user from the named group.
...
I found a bugreport asking to “Remove the Suse usermod command and use world wide standard usermod command!!!”, which was closed as INVALID.
But they seem to have changed it for 12.3 nonetheless…