I needed to create a group named support to manage access to some scripts that should be run as sudo, so I created a group and verified that the group existed in /etc/group:
# groupadd support
# cat /etc/group | grep support
support:x:1002:
Then, I wanted to add user1 to the group:
# usermod –a –G support user1; echo $?
Usage: usermod [options] LOGIN
...
<usermod help page>
...
2
The command returned code 2 and no error message occured. I thought that the problem could be with group support so I tried to add user1 to group sudo (just for testing) and the problem persisted. What am I doing wrong?
OS: Kubuntu 20.04 LTS (5.4.0-58-generic)
BASH: GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)