Subject: Bug#1609: Unable to start an x2go session for a user with $ in the username

From: Bart Janssens <[email-masked]>
Date: Wed, 12 Jul 2023 11:11:51 +0200 (CEST)

Package: perl-X2Go-Server-DB
Version: 4.1.0.3-3.el7.x86_64

Hello,

When trying to create a new session with a user that has a $ in their name the scripts fail at the point where the session is inserted into the database:
db_insertsession called, display: 50, server: server.name, session ID: bj-50-1688552459_stDXFCE_dp24
backend: sqlite
/usr/lib64/x2go/libx2go-server-db-sqlite3-wrapper
err: 

As can be seen the call to the wrapper does not return any response. When trying on the same machine with a user that does not have a $ in the username the wapper does insert the session correctly in the DB.

More OS information:
Linux server.name 3.10.0-1062.el7.x86_64 #1 SMP Wed Aug 7 18:08:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Cheers,
Bart Janssens

---

From: Stefan Baur <[email-masked]>
Date: Tue, 30 Jan 2024 16:11:58 +0100

Hi Bart,

is that dollar sign located at the beginning, in the middle, or at the 
end of the user name?

man 8 useradd states (emphasis mine):

"It is usually recommended to only use usernames that begin with a lower 
case letter or an underscore, followed by lower case letters, digits, 
underscores, or dashes. They can *end* with a dollar sign. In regular 
expression terms: [a-z_][a-z0-9_-]*[$]?"

Kind Regards,
Stefan Baur

-- 
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