From mike.gabriel@das-netzwerkteam.de Mon Sep 23 23:27:36 2013 Received: (at 309) by bugs.x2go.org; 23 Sep 2013 21:27: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=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=ham version=3.3.2 Received: from freya.das-netzwerkteam.de (freya.das-netzwerkteam.de [88.198.48.199]) by ymir (Postfix) with ESMTPS id 8DD425DA6C for <309@bugs.x2go.org>; Mon, 23 Sep 2013 23:27:36 +0200 (CEST) Received: from grimnir.das-netzwerkteam.de (grimnir.das-netzwerkteam.de [78.46.204.98]) by freya.das-netzwerkteam.de (Postfix) with ESMTPS id 43AC6A75 for <309@bugs.x2go.org>; Mon, 23 Sep 2013 23:27:36 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by grimnir.das-netzwerkteam.de (Postfix) with ESMTP id 205F13BF1D for <309@bugs.x2go.org>; Mon, 23 Sep 2013 23:27:36 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at grimnir.das-netzwerkteam.de Received: from grimnir.das-netzwerkteam.de ([127.0.0.1]) by localhost (grimnir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NyZmKBBcWWRf for <309@bugs.x2go.org>; Mon, 23 Sep 2013 23:27:35 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by grimnir.das-netzwerkteam.de (Postfix) with ESMTP id 4209C3BEC6 for <309@bugs.x2go.org>; Mon, 23 Sep 2013 23:27:35 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by grimnir.das-netzwerkteam.de (Postfix) with ESMTP id 0D96F3BB45 for <309@bugs.x2go.org>; Mon, 23 Sep 2013 23:27:34 +0200 (CEST) Received: by grimnir.das-netzwerkteam.de (Postfix, from userid 33) id 65DFC3BE3F; Mon, 23 Sep 2013 23:27:33 +0200 (CEST) Received: from pD9E9E7BE.dip0.t-ipconnect.de (pD9E9E7BE.dip0.t-ipconnect.de [217.233.231.190]) by mail.das-netzwerkteam.de (Horde Framework) with HTTP; Mon, 23 Sep 2013 23:27:33 +0200 Message-ID: <20130923232733.175016qodss5ek3p@mail.das-netzwerkteam.de> X-Priority: 3 (Normal) Date: Mon, 23 Sep 2013 23:27:33 +0200 From: Mike Gabriel To: Stefan Baur Cc: 309@bugs.x2go.org Subject: Re: [X2Go-Dev] Bug#309: Make x2goterminate-session / x2gosuspend-session operable as root References: <20130923122355.13703meclu8eso1n@mail.das-netzwerkteam.de> <52401D1B.2060502@stefanbaur.de> In-Reply-To: <52401D1B.2060502@stefanbaur.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=_atgd9zlehqd"; protocol="application/pgp-signature"; micalg="pgp-sha1" Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.3.4) This message is in MIME format and has been PGP signed. --=_atgd9zlehqd Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit Hi Stefan, On Mo 23 Sep 2013 12:51:07 CEST Stefan Baur wrote: > Am 23.09.2013 12:23, schrieb Mike Gabriel: >> Package: x2goserver >> Severity: wishlist >> >> Currently, only the user owning a session can suspend/terminate >> that session. >> >> The super-user root should also be eligible to act on user sessions >> with those commands. >> >> This should work from any x2goserver (in a multi-node farm) and >> with SQLite and PostgreSQL db backend. > > We're only using single node mode, but here, terminating sessions > from root works (or at least, it did last time we needed it). > x2golistsessions_root | awk -F '|' '{ print $2 " " $12 "@" $8 }' # > lists session-IDs followed by username@clientname > x2goterminate-session $SESSIONID # this terminates the session with > the named ID when called by root With the SQLite backend this surely is the case. > Never tried suspend, but there's x2gosuspend-session which should > work the same way. > > So, either you missed that or your bug report should contain a few > more details as to what functionality you need and what is missing, > I'd say. ;-) With PostgreSQL, you get this: """ x2goterminate-session mga-54-1379970522_stRTERMINAL_dp24 DBD::Pg::st execute failed: ERROR: permission denied for relation sessions_view at /usr/share/perl5/X2Go/Server/DB/PostgreSQL.pm line 417. Died at /usr/share/perl5/X2Go/Server/DB/PostgreSQL.pm line 417. DBD::Pg::st execute failed: ERROR: permission denied for relation sessions_view at /usr/share/perl5/X2Go/Server/DB/PostgreSQL.pm line 328. Died at /usr/share/perl5/X2Go/Server/DB/PostgreSQL.pm line 328. """ Nowadays, the x2gocleansessions daemon script can handle suspend/terminate through a change in the session database. x2goterminate-session and x2gosuspend-session should utilize this new feature. Mike -- DAS-NETZWERKTEAM mike gabriel, herweg 7, 24357 fleckeby fon: +49 (1520) 1976 148 GnuPG Key ID 0x25771B31 mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb --=_atgd9zlehqd Content-Type: application/pgp-signature Content-Description: Digitale PGP-Unterschrift Content-Disposition: inline Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAABAgAGBQJSQLJEAAoJEJr0azAldxsxBUwQAJha/QLU6bY/NDlwGIlln/eI sbwhFRSR9GSaQCQ3JrKypY0LkfP2Rw7GeS8avFaUKs+aWcDwaN9Y90pB5YxQL+Ij kmZE6QrYewsrLRGRgWsbQSzWBldthqwteXpWdjmvso8OtqeUF48s3klcvCdjgaTX HfhGM3tNBRMwJLesXNvduJnfdwf7OxLwPcnD+/EXmHvEE9iMNatG85CQvzdlM2ll YlJJImZU7uKZfSZ7r1a5MoPYP7U1GZBAlHcAiWotjIEa8VElszzj/uun/AJQU3qB r003BWwV4qTEbmyVSUDCM+zQBSTHt3KU2hA806GTM0PzZxXa9bDn3oVGywo26HmY gIYXdzYHbyO49zpLcKwrd14CF1Z4xcAGXRIkDGvTgdH9MPxCLmdj1jHBz26uLdPJ 3yMR/N92+zcu4k45zCih5hRTGlA+d50hI88JJLiCJA6XbEcQxbGf7tqGsZi2yqcg tb2cn0glO8cdBaifvEdq7RjHtbnvDeIMyReodv+IFZSFtnwfETs/h9kl14DIGchE pEQ3PtLwMVKfzxYws5xDGhyYoyExipgx0huRqvCC5SnRiVy2iQtzreMTYekuGUCY 0AKWkBhXzOjQ7sMuEY+Diidhr83HDENEdz24VBovjbVwOq9/LjdrM8cZn3powtlq oPJQ4W2KB9Nf+UPhvx9u =BuZ8 -----END PGP SIGNATURE----- --=_atgd9zlehqd--