Found this example stating you can add a user with a uid and gid at the same time. Both uid and gid are different. I then tried it with the same number for user and group.
Example:
Code:
useradd -u 1001 jsmith -g 2001 jsmith
useradd: group '2001' does not exit
useradd -u 9999 mberenyi -g 9999 mberenyi
useradd: group '9999' does not exit
I can't get either to work. Even though the example I found is saying it will work.
Is there a way to add a user by uid and gid with useradd? Or is this incorrect?