From unknown Thu Mar 28 10:27:40 2024 X-Loop: owner@bugs.x2go.org Subject: Bug#1145: [X2Go-Dev] Bug#1145: Bug#1145: x2godbadmin + postgres + non-existent home directory = wrong ownerships Reply-To: Walid MOGHRABI , 1145@bugs.x2go.org Resent-From: Walid MOGHRABI Resent-To: x2go-dev@lists.x2go.org Resent-CC: X2Go Developers X-Loop: owner@bugs.x2go.org Resent-Date: Wed, 08 Feb 2017 09:00:02 +0000 Resent-Message-ID: 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.14865443177336 (code B ref 1145); Wed, 08 Feb 2017 09:00:02 +0000 Received: (at 1145) by bugs.x2go.org; 8 Feb 2017 08:58:37 +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.0 required=3.0 tests=BAYES_40,MIME_QP_LONG_LINE, URIBL_BLOCKED autolearn=ham version=3.3.2 Received: from localhost (localhost [127.0.0.1]) by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 45A1B5DA49 for <1145@bugs.x2go.org>; Wed, 8 Feb 2017 09:58:35 +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 wcUoyC103F+j for <1145@bugs.x2go.org>; Wed, 8 Feb 2017 09:58:28 +0100 (CET) X-Greylist: delayed 334 seconds by postgrey-1.34 at ymir.das-netzwerkteam.de; Wed, 08 Feb 2017 09:58:28 CET Received: from zm-01.servicemagic.eu (zm-01.servicemagic.eu [176.31.236.17]) by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 7552E5DA2D for <1145@bugs.x2go.org>; Wed, 8 Feb 2017 09:58:28 +0100 (CET) Received: from localhost (localhost.localdomain [127.0.0.1]) by zm-01.servicemagic.eu (Postfix) with ESMTP id 284C3812E4E87; Wed, 8 Feb 2017 09:52:53 +0100 (CET) X-Amavis-Modified: Mail body modified (using disclaimer) - zm-01.servicemagic.eu X-Virus-Scanned: amavisd-new at servicemagic.eu Received: from zm-01.servicemagic.eu ([127.0.0.1]) by localhost (zm-01.servicemagic.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08syCk-3EqvS; Wed, 8 Feb 2017 09:52:48 +0100 (CET) Received: from zm-01.servicemagic.eu (localhost.localdomain [127.0.0.1]) by zm-01.servicemagic.eu (Postfix) with ESMTP id 21A6F8120B961; Wed, 8 Feb 2017 09:52:48 +0100 (CET) Date: Wed, 8 Feb 2017 09:52:48 +0100 (CET) From: Walid MOGHRABI To: Nable , 1145@bugs.x2go.org Cc: Stefan Baur Message-ID: <385892791.2883907.1486543968090.JavaMail.root@servicemagic.eu> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.33.100.60] X-Mailer: Zimbra 7.2.0_GA_2669 (ZimbraWebClient - GC56 (Linux)/7.2.0_GA_2669) Hi, To add my 2 cents, I workarounded this by creating a small helper script fo= r provisionning my accounts which does the x2godbadmin --adduser stuff + a = few other things (provisionning the /etc/skel content, setting right user p= erms, ...) I don't think it is mandatory to expand these features inside the script bu= t creating good documentation about those script (and I include scripts suc= h as x2golistsession, x2goterminatesession, ...) and good error reporting w= ould be great because it's very hard o know what they do unless you tap dir= ectly inside the code itself (which I did at then end). Regards, Walid Moghrabi TRAVAUX.COM BAT I - PARC CEZANNE 2 290 AVENUE GALILEE - CS 80403 13591 AIX EN PROVENCE CEDEX 3 ----- Mail original -----=20 De: "Nable" =20 =C3=80: "Stefan Baur" =20 Cc: 1145@bugs.x2go.org=20 Envoy=C3=A9: Mercredi 8 F=C3=A9vrier 2017 02:32:52=20 Objet: [X2Go-Dev] Bug#1145: Bug#1145: x2godbadmin + postgres + non-existent= home directory =3D wrong ownerships=20 > Are you aware of anything that does that and that we could call?=20 I think that setup with absent homedir && non-configured pam_mkhomedir=20 is broken anyway and one can only fail gracefully with a good error=20 message.=20 Other variants (homedir already exists and/or pam_mkhomedir is=20 configured) can be covered by calling `su' or `sudo' with appropriate=20 options (e.g. su -c /bin/true "${user_to_add}").=20 This would fail if homedir (either existing or not) is located on a=20 network or encrypted FS (where local root can't do anything without=20 knowing user's password) but this is a separate issue.=20 I've also seen posts (e.g.[1]) about `oddjob-mkhomedir' (and I've=20 already seen it in Debian repos) but I wonder if this way is=20 production-ready. And this way seems to be more complex.=20 [1] https://access.redhat.com/discussions/903523=20 _______________________________________________=20 x2go-dev mailing list=20 x2go-dev@lists.x2go.org=20 http://lists.x2go.org/listinfo/x2go-dev --- DISCLAIMER: This e-mail is private and confidential and may contain proprietary or legally privileged information. It is for the intended recipient only. If you have received this email in error, please notify the author by replying to it and then destroy it. If you are not the intended recipient you must not use, disclose, distribute, copy, print or rely on this e-mail or any attachment. Thank you