When running the following line, I expect the new user- user3- to be added with the GID of 1001, but when ran the user is not listed in either the /etc/group nor the /etc/gshadow files:
# useradd -u 1010 -g 1001 -m -d /home/user3 -k /etc/skel -s /bin/bash user3
Then, when searching for user3, no results are given:
# cd /etc; grep user3 group gshadow
When grepping for the GID, only the other user- user2- that belongs to that group is found:
# cd /etc; grep 1001 group gshadow
group:user2:x:1001:
I am currently running:
CentOS Linux release 7.3.1611 (Core)
3.10.0-514.2.2.el7.x86_64 #1 SMP Tue Dec 6 23:06:41 UTC 2016 x86_64 x86_64 x86_64