I've run into issue with kickstart and user creation. From long-long time ago I had in my kickstart these lines to create user:
user --name=a --gecos="A" --uid=500 --groups=wheel --password="..." --iscrypted
user --name=b --gecos="B" --uid=501 --groups=wheel --password="..." --iscrypted
It worked fine on CentOS 6, but when I tried to use it with CentOS 7.2, I've run into issues where because first usergroup will be 1000, I end up with the user with uid=500, but gid=1000. So, I added group creation commands:
group --name=a --gid=500
group --name=b --gid=501
Then added --gid=XXX
to the user command. Installation succeeds, I get user and group with correct ids, but there are two issues:
--groups=wheel
was ignored;- Password I supplied does not work anymore.
The problem, certainly, goes away if I remove --gid=XXX
from the user creation command.
What would be causing this problem?
I am aware, that as of CentOS 7/RHEL 7 gids/uids bellow 1000 are reserved for system groups/users, but all of my users are in 500 range and can't change this just yet.