Page 1 of 1

Bug? Or maybe User Error: Can't create a new user

Posted: Wed Apr 26, 2023 6:35 am
by BigKuma
This is a fresh install from the master branch in Ubuntu Jammy Server.
1.37.40~20230424175325-jammy amd64
I tried to make a user through the Options->Users-> Add New User

I tried to debug this, installed DBeaver,
Using default zmuser/zmpass credentials only let me see ZM database, not the Users.

This is the error log entry, missing MonitorIds it says:

/26/23, 12:23:11 AM MDT web_php 38693 ERR SQL-ERR '00000', statement was 'INSERT INTO `Users` (`Id`, `Username`, `Name`, `Email`, `Phone`, `Password`, `Language`, `Enabled`, `Stream`, `Events`, `Control`, `Monitors`, `Groups`, `Devices`, `Snapshots`, `System`, `MaxBandwidth`, `MonitorIds`, `TokenMinExpiry`, `APIEnabled`, `HomeView`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' /usr/share/zoneminder/www/includes/database.php 119
4/26/23, 12:23:11 AM MDT web_php 38693 ERR SQL-ERR 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'MonitorIds' in 'field list'', statement was 'INSERT INTO `Users` (`Id`, `Username`, `Name`, `Email`, `Phone`, `Password`, `Language`, `Enabled`, `Stream`, `Events`, `Control`, `Monitors`, `Groups`, `Devices`, `Snapshots`, `System`, `MaxBandwidth`, `MonitorIds`, `TokenMinExpiry`, `APIEnabled`, `HomeView`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' params:,MYNAME,MYNAME,,,$MYHASH,,1,View,Edit,Edit,Edit,None,Edit,None,Edit,,,0,1, /usr/share/zoneminder/www/includes/database.php 161

Do I just need to grab a more recent version ?
Or do I need to set other Authentication Options first ?

Thanks!

Re: Bug? Or maybe User Error: Can't create a new user

Posted: Wed Apr 26, 2023 9:03 am
by Magic919
This looks like the problem -

Unknown column 'MonitorIds' in 'field list'

Sounds like your DB is incomplete.

Re: Bug? Or maybe User Error: Can't create a new user

Posted: Wed Apr 26, 2023 4:21 pm
by BigKuma
Thanks for the reply.

What's the password for the Users DB ?

Re: Bug? Or maybe User Error: Can't create a new user

Posted: Wed Apr 26, 2023 5:38 pm
by Magic919
It’s nothing to do with ZM if you have a ‘users’ DB. ZM users are a table in the ZM DB.

Re: Bug? Or maybe User Error: Can't create a new user

Posted: Fri Apr 28, 2023 3:08 pm
by iconnor
You might just need to update. I think I fixed that on the 23rd.