Subject: Re: CreateDB fails with error `DBI connect('dbname=/var/lib/x2go/x2go_sessions', '', ...) failed`

From: Mihai Moldovan <[email-masked]>
Date: Tue, 4 Oct 2016 13:36:29 +0200

On 11.09.2016 05:09 AM, Sivachidambaram Somu wrote:
> Sometimes I get the below error while trying to recreate DB. If I try to create
> the user myself, I end up back in square one with the error I posted in my first
> email.
> 
> %sudo x2godbadmin --createdb 
> 
> Can not find user (x2gouser)

I really don't understand how you can get this error. This means that the perl
installation, that uses standard PAM libraries, was not able to get information
for the 'x2gouser' user account on your system. Maybe files in /etc (like passwd
or shadow) or an active- or LDAP directory are not available all the time on
your system. From what I can tell, this looks like a connection issue between
vital systems on your end. The X2Go scripts are not doing something
sophisticated but simply calling the standard getpwnam() function in perl, which
SHOULD map more or less directly to the getpwnam() function in the C library. If
that is returning invalid information, you're in for trouble...

You could try applying http://tinyurl.com/hy4mb4x but I doubt that'll help you a
lot. :/

Mihai