X2Go Bug report logs - #309
Make x2goterminate-session / x2gosuspend-session operable as root

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

Reported by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>

Date: Mon, 23 Sep 2013 10:33:02 UTC

Severity: wishlist

Full log


🔗 View this message in rfc822 format

X-Loop: owner@bugs.x2go.org
Subject: Bug#309: [X2Go-Dev] Bug#309: Make x2goterminate-session / x2gosuspend-session operable as root
Reply-To: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>, 309@bugs.x2go.org
Resent-From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Resent-To: x2go-dev@lists.berlios.de
Resent-CC: X2Go Developers <x2go-dev@lists.berlios.de>
X-Loop: owner@bugs.x2go.org
Resent-Date: Mon, 23 Sep 2013 21:33:02 +0000
Resent-Message-ID: <handler.309.B309.137997165721635@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: followup 309
X-X2Go-PR-Package: x2goserver
X-X2Go-PR-Keywords: 
Received: via spool by 309-submit@bugs.x2go.org id=B309.137997165721635
          (code B ref 309); Mon, 23 Sep 2013 21:33:02 +0000
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 <mike.gabriel@das-netzwerkteam.de>
To: Stefan Baur <newsgroups.mail2@stefanbaur.de>
Cc: 309@bugs.x2go.org
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)
[Message part 1 (text/plain, inline)]
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
[Message part 2 (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Tue Dec 3 17:16:45 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.