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


🔗 View this message in rfc822 format

X-Loop: owner@bugs.x2go.org
Subject: Bug#1145: [X2Go-Dev] Bug#1145: x2godbadmin + postgres + non-existent home directory = wrong ownerships
Reply-To: Stefan Baur <X2Go-ML-1@baur-itcs.de>, 1145@bugs.x2go.org
Resent-From: Stefan Baur <X2Go-ML-1@baur-itcs.de>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: X2Go Developers <x2go-dev@lists.x2go.org>
X-Loop: owner@bugs.x2go.org
Resent-Date: Tue, 07 Feb 2017 22:55:01 +0000
Resent-Message-ID: <handler.1145.B1145.14865080581972@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: followup 1145
X-X2Go-PR-Package: x2goserver
X-X2Go-PR-Keywords: 
Received: via spool by 1145-submit@bugs.x2go.org id=B1145.14865080581972
          (code B ref 1145); Tue, 07 Feb 2017 22:55:01 +0000
Received: (at 1145) by bugs.x2go.org; 7 Feb 2017 22:54:18 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_05 autolearn=ham
	version=3.3.2
Received: from localhost (localhost [127.0.0.1])
	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 ([127.0.0.1])
	by localhost (ymir.das-netzwerkteam.de [127.0.0.1]) (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 [217.72.192.75])
	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 [192.168.0.23] ([78.43.90.159]) by mrelayeu.kundenserver.de
 (mreue102 [212.227.15.145]) with ESMTPSA (Nemesis) id
 0LbrjI-1cC6Mu41qe-00jGD3; Tue, 07 Feb 2017 23:41:37 +0100
To: Nable <nable.maininbox@googlemail.com>, 1145@bugs.x2go.org
References: <8fbce1f7-5f1a-465b-615b-b2ccf6b87b51@baur-itcs.de>
 <CALxOYEbeJfQ2Ona6urYjPezRbMBx8zGvuQShvnwGN5m3zo1fTA@mail.gmail.com>
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
 Thunderbird/45.7.0
MIME-Version: 1.0
In-Reply-To: <CALxOYEbeJfQ2Ona6urYjPezRbMBx8zGvuQShvnwGN5m3zo1fTA@mail.gmail.com>
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="Wa4qi4TJKBgLTJICjgwjoPHP08CXrPR49"
X-Provags-ID: V03:K0:GTLt9p39GtizAfBx+NmXdfVOz6O//bIMAwxQMzDoaxwx76XG+Gl
 +bwDlvtUfuouVKbkxA9ynFTwdmvtvVBQVVDRN70GpYoqdZJwwJ0yghzOrXMb6cfOuyff4+q
 UMFpndx7DqK9TTZnuW9pcEYoJAsgxzbDJu04qOMcxewzE6xMEvd/maSwSlsMAgZJnXbb/ot
 4aHPf47WxMXAP4id1ELlQ==
X-UI-Out-Filterresults: notjunk:1;V01:K0:FiTQYGj6frs=:Y30cssZnwlLgdOpvNyszVl
 V4DamgcB9OcCg5f07q3lEX6VJ9Q41BhI/wxVzj1f4ZwfIOEUDv4zcYYISYWdYd+HcNenkZm2A
 EisST4oLQ/94dzPen5mNiPttjAig7vd8F+70uoEAl6RLq56bZ+GJRbbYRi3Ulpz/tA/iepVwt
 IdyVXSvJSSxud0apLn3ltywDd4S7rAYcXympD35ADgDs55zhT5d9tkg3LnL2Iqs71EmbE3tIS
 YMBqnFwFCOst+vuf9DUTiSu9IGiFxyJB182xf1l+CRAAmtzwEiQiYF0L/s6O+WqnEyHGguL8u
 WW4WNdCFEwtTOpiSX78PzVbXnSMu06Y2xT12H/yUylPlUTcjcfYxtoGemUSAYm2h4x6TPQrem
 B1meeRPlQNZhQay3vissGPdujuhZ54x/ovdM8OuJKqJvWCguN87Z2P36bUFWI/87s3FawQUrX
 T/ic+RQcV/K1mCQWuVFbiUmaAxvubOBNHcRb0Fp0/tkODy4Q4l94R17pzYRe0bOiuv6cLCGag
 VnVNJTzvIqE14DKjisqvW4BczcRnE1hcA7KrF6j/5xxAKBy4fI31nePrPBnfx/+UjWP3kp6NT
 umwKJ7+jMGeNOBoXMlIP4t3B+SwLt2fQ6BGgX3000YiS+9PgjlSom+ZYcq33xK9kYm9AOX0+2
 wZobVjtVuiDOVAXsa9HAMJc13GAxJr/oKXZso3v8koiNl4YjBsdKcvYXQ2BselDzlOO4=
[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?

-Stefan

-- 
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: Thu Nov 21 16:45:00 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.