Code was adding '-a' even when the user was already in the desired groups…
Code was adding '-a' even when the user was already in the desired groups causing usermod to fail since there was no '-G' option. This is duplicate code (3 lines) from the 'group' section, so could be improved, but it works.
Showing
Please
register
or
sign in
to comment