Bug 1279041 - ValueError: GID 100500 already exists
Summary: ValueError: GID 100500 already exists
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 23
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David Shea
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:f26564cf1b0f4dccae78da892cf...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-07 12:21 UTC by Oleksii Marchenko
Modified: 2016-05-30 15:11 UTC (History)
5 users (show)

Fixed In Version: anaconda-24.7-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-02 22:48:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: anaconda-tb (1.22 MB, text/plain)
2015-11-07 12:21 UTC, Oleksii Marchenko
no flags Details
File: anaconda.log (32.56 KB, text/plain)
2015-11-07 12:21 UTC, Oleksii Marchenko
no flags Details
File: environ (615 bytes, text/plain)
2015-11-07 12:22 UTC, Oleksii Marchenko
no flags Details
File: journalctl (831.74 KB, text/plain)
2015-11-07 12:22 UTC, Oleksii Marchenko
no flags Details
File: lsblk_output (2.40 KB, text/plain)
2015-11-07 12:22 UTC, Oleksii Marchenko
no flags Details
File: nmcli_dev_list (2.19 KB, text/plain)
2015-11-07 12:22 UTC, Oleksii Marchenko
no flags Details
File: os_info (518 bytes, text/plain)
2015-11-07 12:22 UTC, Oleksii Marchenko
no flags Details
File: program.log (112.87 KB, text/plain)
2015-11-07 12:22 UTC, Oleksii Marchenko
no flags Details
File: storage.log (165.11 KB, text/plain)
2015-11-07 12:22 UTC, Oleksii Marchenko
no flags Details
File: ifcfg.log (4.66 KB, text/plain)
2015-11-07 12:22 UTC, Oleksii Marchenko
no flags Details
File: packaging.log (133 bytes, text/plain)
2015-11-07 12:22 UTC, Oleksii Marchenko
no flags Details

Description Oleksii Marchenko 2015-11-07 12:21:48 UTC
Description of problem:
When installing Fedora23:

- click on User Creation
- click Advanced
- set user group id to 100500
- in groups field, write "samplegroupname (100500)"

And then this error occurs. 

Expected behavior: 
1. A group with the name "samplegroupname" and gid 100500 is created
2. "samplegroupname" group is assigned as a main group for my new user

Actually I think this can be an invalid way to achieve what I want, but then it is not obvious how to do this during system installation. 

Version-Release number of selected component:
anaconda-core-23.19.10-1.fc23.x86_64

The following was filed automatically by anaconda:
anaconda 23.19.10-1 exception report
Traceback (most recent call first):
  File "/usr/lib64/python3.4/site-packages/pyanaconda/users.py", line 223, in createGroup
    raise ValueError("GID %s already exists" % kwargs.get("gid"))
  File "/usr/lib64/python3.4/site-packages/pyanaconda/users.py", line 270, in createUser
    self.createGroup(user_name, gid=kwargs['gid'], root=root)
  File "/usr/lib64/python3.4/site-packages/pyanaconda/kickstart.py", line 1742, in execute
    if not users.createUser(usr.name, **kwargs):
  File "/usr/lib64/python3.4/site-packages/pyanaconda/install.py", line 96, in doConfiguration
    ksdata.user.execute(storage, ksdata, instClass, u)
  File "/usr/lib64/python3.4/threading.py", line 868, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python3.4/site-packages/pyanaconda/threads.py", line 253, in run
    threading.Thread.run(self, *args, **kwargs)
ValueError: GID 100500 already exists

Additional info:
cmdline:        /usr/bin/python3  /sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-base
cmdline_file:   initrd=initrd0.img root=live:CDLABEL=LIVE rootfstype=vfat ro rd.live.image quiet rhgb rd.luks=0 rd.md=0 rd.dm=0 BOOT_IMAGE=vmlinuz0 
executable:     /sbin/anaconda
hashmarkername: anaconda
kernel:         4.2.3-300.fc23.x86_64
other involved packages: python3-libs-3.4.3-5.fc23.x86_64
product:        Fedora
release:        Fedora release 23 (Twenty Three)
type:           anaconda
version:        23

Comment 1 Oleksii Marchenko 2015-11-07 12:21:57 UTC
Created attachment 1090933 [details]
File: anaconda-tb

Comment 2 Oleksii Marchenko 2015-11-07 12:21:59 UTC
Created attachment 1090934 [details]
File: anaconda.log

Comment 3 Oleksii Marchenko 2015-11-07 12:22:01 UTC
Created attachment 1090935 [details]
File: environ

Comment 4 Oleksii Marchenko 2015-11-07 12:22:06 UTC
Created attachment 1090936 [details]
File: journalctl

Comment 5 Oleksii Marchenko 2015-11-07 12:22:08 UTC
Created attachment 1090937 [details]
File: lsblk_output

Comment 6 Oleksii Marchenko 2015-11-07 12:22:09 UTC
Created attachment 1090938 [details]
File: nmcli_dev_list

Comment 7 Oleksii Marchenko 2015-11-07 12:22:10 UTC
Created attachment 1090939 [details]
File: os_info

Comment 8 Oleksii Marchenko 2015-11-07 12:22:13 UTC
Created attachment 1090940 [details]
File: program.log

Comment 9 Oleksii Marchenko 2015-11-07 12:22:15 UTC
Created attachment 1090941 [details]
File: storage.log

Comment 10 Oleksii Marchenko 2015-11-07 12:22:17 UTC
Created attachment 1090942 [details]
File: ifcfg.log

Comment 11 Oleksii Marchenko 2015-11-07 12:22:18 UTC
Created attachment 1090943 [details]
File: packaging.log

Comment 12 David Shea 2015-11-09 14:42:12 UTC
The actual problem is that GID 100500 is greater than Fedora's maximum GID of 60000, configured in /etc/login.defs. We can fix the error message and change the validation to catch this earlier, so that it doesn't crash the installer.

As far as being unable to use GID 100500, I don't know why Fedora uses 60000 as the maximum. I'd suggest opening a bug against distribution or shadow-utils if you think that should be changed.

Comment 13 Oleksii Marchenko 2015-11-09 15:18:32 UTC
I disagree. 

I'm using this GID (100500) for a couple of years starting from FC19, and no problems at all, it acts as a normal GID. 

But the actual problem is that it is trying to create a new group with the same GID as existing one. Simple enough to reproduce on installed system:

--------------------------------------------------------
~
omarchenko@kml18 [Mon Nov 09 16:56:04]∯  id
uid=1001(omarchenko) gid=100500(kml) groups=100500(kml),10(wheel)

~
omarchenko@kml18 [Mon Nov 09 16:57:44]∯  sudo groupadd -g 100500 samplegroup
[sudo] password for omarchenko: 
groupadd: GID '100500' already exists    <<<<<< this is the message I get during
                                                installation process

~
omarchenko@kml18 [Mon Nov 09 16:58:55]∯  cat /etc/issue
Fedora release 21 (Twenty One)

--------------------------------------------------------
It does reproduce on any system I believe. 

the actual proplem (IMHO) is as follows:
1. Because I've set GID for the user to 100500, it firstly created a new user, AND a group for that user with the GID 100500.

2. After creating the user, it tries to create groups from the list, and fails because this GID is already used for the user group. 

To summarize:
I expected that providing following info in that form during installation:
========================
V    UID: 100500
V    GID: 100500

Groups:  samplegroup(100500)
========================

it will create a group with the name "samplegroup" and set it as users' default group, but instead it firstly created group with the name "user", and then failed to create "samplegroup" with the same GID.

This is definitely anacondas' bug. Anaconda should perform a simple check and don't fail if the same GID is provided for a custom group as for the user, this should not crash all installation process.

Comment 15 armel 2016-05-30 15:11:14 UTC
Another user experienced a similar problem:

When installing Fedora-Live-Workstation-x86_64-23-10.iso, the installation freezes upon creating users (one root, one non root). My computer is a 4 proc (64 bits), a 500 Go hard disk and an already installed Ws 7 64 bits.
regards, 
armel

cmdline:        /usr/bin/python3  /sbin/anaconda --liveinst --method=livecd:///dev/mapper/live-base
cmdline_file:   BOOT_IMAGE=vmlinuz0 initrd=initrd0.img root=live:CDLABEL=Fedora-Live-WS-x86_64-23-10 rootfstype=auto ro rd.live.image quiet  rhgb rd.luks=0 rd.md=0 rd.dm=0 
hashmarkername: anaconda
kernel:         4.2.3-300.fc23.x86_64
other involved packages: python3-libs-3.4.3-5.fc23.x86_64
package:        anaconda-core-23.19.10-1.fc23.x86_64
product:        Fedora
reason:         ValueError: GID 1000 already exists
release:        Fedora release 23 (Twenty Three)
version:        23


Note You need to log in before you can comment on or make changes to this bug.