On Monday, 26 June 2023 at 03:16, James Ralston wrote:
[...]
To remove a user from a group:
lgroupmod -m someuser somegroup
[...]
But groupmod has no ability to remove a user from a group.
[...]
For shadow-utils 4.10 or later, usermod has a new -r option, so it
is
possible to construct an equivalent:
usermod -r -G somegroup someuser
While this is a vast improvement, I would argue this option was added
to the wrong utility: groupmod should have the ability to remove a
user from a group, the same as lgroupmod. It’s also fairly new (RHEL9
still has shadow-utils 4.9, for example).
Agreed. Have you tried opening an issue upstream and/or in RHEL
bugzilla?
Regards,
Dominik
--
Fedora
https://fedoraproject.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
-- from "Collected Sayings of Muad'Dib" by the Princess Irulan