opendcim / openDCIM

An open source (GPL v3) Data Center Inventory Management (DCIM) application.
http://opendcim.org
305 stars 204 forks source link

Admin user not created during initial installation #1452

Closed wilpig closed 11 months ago

wilpig commented 11 months ago

Discussed in https://github.com/opendcim/openDCIM/discussions/1451

Originally posted by **Hideaki-Sumiyoshi** October 5, 2023 Hi, I newly installed [OpenDCIM 23.03](https://opendcim.org/packages/openDCIM-23.03.tar.gz) on Oracle Linux 9.2(clean install). According to Wiki pages for RHEL 9, I installed and started OpenDCIM. After first login as "dcim", there's only [Reports] button on the GUI sidebar, and I couldn't do anything else. It seems to have no admin permissions. I saw MariaDB "fac_People" table, but can't see any user in it. I found when initial installation process creates database tables, it adds "Country" column to the "fac_People" table. After that, installation process attempts to add admin user (dcim) to the "fac_People" table with "CountryCode" column, then fails. Would you please fix this? I did following workaround to avoid this: ``` MariaDB [none]> USE dcim; MariaDB [dcim]> ALTER TABLE fac_People RENAME COLUMN Country TO CountryCode; ``` And re-created admin user manually: ``` MariaDB [dcim]> INSERT INTO fac_People SET userid='dcim', lastname='', firstname='', phone1='', phone2='', countrycode='', email='', apikey='', adminowndevices='1', readaccess='1', writeaccess='1', deleteaccess='1', contactadmin='1', rackrequest='1', rackadmin='1', bulkoperations='1', siteadmin='1', disabled='0', lastactivity='0000-00-00', expirationdate='0000-00-00' ; ```