X2Go Bug report logs - #1145
x2godbadmin + postgres + non-existent home directory = wrong ownerships

Package: x2goserver; Maintainer for x2goserver is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goserver is src:x2goserver.

Reported by: Stefan Baur <X2Go-ML-1@baur-itcs.de>

Date: Tue, 7 Feb 2017 13:15:02 UTC

Severity: normal

Full log

Message #15 received at 1145@bugs.x2go.org (full text, mbox, reply):

Received: (at 1145) by bugs.x2go.org; 7 Feb 2017 22:54:18 +0000
From X2Go-ML-1@baur-itcs.de  Tue Feb  7 23:54:17 2017
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_05 autolearn=ham
Received: from localhost (localhost [])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 1D9165DA49
	for <1145@bugs.x2go.org>; Tue,  7 Feb 2017 23:54:17 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at ymir.das-netzwerkteam.de
Received: from ymir.das-netzwerkteam.de ([])
	by localhost (ymir.das-netzwerkteam.de []) (amavisd-new, port 10024)
	with ESMTP id PvicZvHTVDj0 for <1145@bugs.x2go.org>;
	Tue,  7 Feb 2017 23:54:10 +0100 (CET)
X-Greylist: delayed 753 seconds by postgrey-1.34 at ymir.das-netzwerkteam.de; Tue, 07 Feb 2017 23:54:10 CET
Received: from mout.kundenserver.de (mout.kundenserver.de [])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 706BF5DA2D
	for <1145@bugs.x2go.org>; Tue,  7 Feb 2017 23:54:10 +0100 (CET)
Received: from [] ([]) by mrelayeu.kundenserver.de
 (mreue102 []) with ESMTPSA (Nemesis) id
 0LbrjI-1cC6Mu41qe-00jGD3; Tue, 07 Feb 2017 23:41:37 +0100
Subject: Re: [X2Go-Dev] Bug#1145: x2godbadmin + postgres + non-existent home
 directory = wrong ownerships
To: Nable <nable.maininbox@googlemail.com>, 1145@bugs.x2go.org
References: <8fbce1f7-5f1a-465b-615b-b2ccf6b87b51@baur-itcs.de>
From: Stefan Baur <X2Go-ML-1@baur-itcs.de>
Message-ID: <2889078d-8670-e2b9-c92e-f303690e0388@baur-itcs.de>
Date: Tue, 7 Feb 2017 23:41:17 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101
MIME-Version: 1.0
In-Reply-To: <CALxOYEbeJfQ2Ona6urYjPezRbMBx8zGvuQShvnwGN5m3zo1fTA@mail.gmail.com>
Content-Type: multipart/signed; micalg=pgp-sha256;
X-Provags-ID: V03:K0:GTLt9p39GtizAfBx+NmXdfVOz6O//bIMAwxQMzDoaxwx76XG+Gl
X-UI-Out-Filterresults: notjunk:1;V01:K0:FiTQYGj6frs=:Y30cssZnwlLgdOpvNyszVl
[Message part 1 (text/plain, inline)]
Am 07.02.2017 um 23:14 schrieb Nable:

>> When x2godbadmin is used with a postgres database, and the user name
>> given doesn't yet have a home directory, it creates this home directory.
> I've thought that creation of home directories is a task for useradd
> (for local users) or pam_mkhomedir from libpam-modules (in case of
> centralized database of network logins) and there may be even more
> existing alternatives. Should this non-trivial code be implemented
> once again in X2Go tools instead of trying to keep things closer to a
> UNIX-way?

Well, there already is code in there that is doing it - it just does it
wrong in this particular case.  Of course, we could argue that the
entire piece of code should be removed - but how would you handle things
in this particular case?
Having no /home/<username> is something that is most likely to happen
with non-local accounts.
pam_mkhomedir fixes this and creates it on the spot - IF, and only IF
the user logs in.
x2godbadmin, however, needs to be run
- on the x2goserver
- by root
- before the user logs in

-> chicken and egg.

So - to expand this bug - what we'd need is some piece of code that does
what pam_mkhomedir does (not only create the directory and set
ownership/permissions, *but also* populate it with the contents of
/etc/skel) - but for a user other than the one that's currently logged
in.  Are you aware of anything that does that and that we could call?


BAUR-ITCS UG (haftungsbeschränkt)
Geschäftsführer: Stefan Baur
Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243

[signature.asc (application/pgp-signature, attachment)]

Send a report that this bug log contains spam.

X2Go Developers <owner@bugs.x2go.org>. Last modified: Mon Apr 22 18:26:20 2024; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.