7

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:

  1. --groups=wheel was ignored;
  2. 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.

sashk
  • 334
  • 1
  • 9
  • 18
  • 1
    https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html this page states there is a bug in the `--gid` directive. Maybe this is an indirect consequence of it. – Pierre-Alain TORET Dec 23 '15 at 15:17
  • Thank you. Somehow I missed this while reading this guide couple days ago (or bug notice was recent addition). Feel free to submit an answer, so I could accept it. – sashk Dec 23 '15 at 18:43

1 Answers1

4

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html The official documentation states the --gid directive as being buggy.

Pierre-Alain TORET
  • 1,254
  • 8
  • 14