Invalid settings in userdb: userdb returned 0 as uid

Discussion in 'General' started by spazio, Sep 6, 2017.

  1. spazio

    spazio Member HowtoForge Supporter

    The setup is ISPConfig 3.1.6
    lsb_release -a
    No LSB modules are available.
    Distributor ID: Debian
    Description: Debian GNU/Linux 8.9 (jessie)
    Release: 8.9
    Codename: jessie

    The server is in production mode for over one year and working great! some time ago I edited a mailbox and this problem happend. I corrected it and told myself bd problem. But it happend again this mornig and I did some test and it' salways there!

    After editing any mailbox in the system. The following parameter are empty in `mail_user`table
    uid = 0
    gid = 0
    maildir = empty filed ( nothing but not NULL)
    homedir = empty filed ( nothing but not NULL)

    And if the user tries to send and received from outlook it doesn't work!
    In the log here is the error message: Invalid settings in userdb: userdb returned 0 as uid

    Any idea?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Most likely wrong or corrupted settings under System > server config > mail.
  3. spazio

    spazio Member HowtoForge Supporter

    That is it!
    There is problems with what is in the filds in the mail tab!

    I changed the values but I can't save the new values.
    I get this error:
    1- Uid-mapping cannot be changed if there are already mail users.

    I gess I need to change the values in the ispdb!
    The table for those values is dbispconfig.serveer.config
    And Voila! it fix the problem

    Thanks Till!
    Last edited: Sep 6, 2017
  4. corpus

    corpus Member

    Thanks for the help. I had the same problem and fixed it with your help.
    For all those who don't have the values in the dbispconfig.serveer.config
    i paste mine

  5. Pedro A.

    Pedro A. New Member

    I tried to create a new account to my server and I noticed same error: Invalid settings in userdb...
    And in mail section of server config some field are empty.
    I've got access to dbispconfig through phpmyadmin but I don't know where [mail] section is.
    I've a 3.1.15 version of ISP (yes, I know it's an old version but it's in production and I don't like to make any changes but now I've found this problem and I'm forced).
    In other hand I don't know if editing the database and introducing this data solves the problem or however crashes the server.
    Please, help!
  6. pyte

    pyte Active Member HowtoForge Supporter

    The section is located in the database table "server" the field is called "config". Check the data if there is something missing and consider posting it here before you make any changes.
  7. Pedro A.

    Pedro A. New Member

    I've checked that and there's no [mail] section into config filed. I've seen that this section must be below [server] (I see that at other server that is working ok) but it's missed.
    I don't know what would happen if I copy the code from the good server and paste it at the wrong server.
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you have any backups which include the dbispconfig database? There might be older backups in /var/backup/

    Btw. Not updating a production system does not make it run more reliably, it causes the opposite, as bugs and security issues on your system are not fixed.
    pyte likes this.
  9. Pedro A.

    Pedro A. New Member

    This is a virtual machine. I've some backups of all entire machine. And I make daily backups.
    Then, It's possible copy and paste that section? Or It's recommended update the ispconfig version before? Considering the working server has 3.2.8 version.
  10. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    so you have multiple servers.. all standalone or multi-server?
    if multi-server, they should ALL be running the same version... differences in dbispconfig table settings / fields between different servers can lead to all sorts of problems.

    if you can find a backup of that servers dbispconfig database with the full config field, just cut and paste that back into the live db (accounting for any other changes that may have happened since the backup)
  11. Pedro A.

    Pedro A. New Member

    Yes, I've multiple servers but all standalone. Different virtual machines.
    I don't know when this problem starts to happen (this is a server I don't usually use) then I can't restore a backup without affecting mail clients.
  12. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    copy the whole config field from a working vps and paste it into a text editor.
    compare that to what you have for the field in the broken vps.
    paste in any missing bits, adjusting as required, eg amavis/rspamd, dkim strength etc...
    till likes this.

Share This Page