[Bug]: cs2server ignores the GSLT entered during install
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 82/100
Línea de trabajo
Lee en lgsm/config-default/config-lgsm/cs2server/_default.cfg la sección alrededor de la definición de startparameters y compárala con el manejo de GSLT en otras configuraciones de servidores Source. Añade el argumento del token después de +exec ${selfname}.cfg, ya que las pruebas reportadas muestran que el orden importa. El trabajo estará terminado cuando una instalación nueva pase el token introducido al servidor y su consola inicie sesión en la cuenta de Steam gameserver con ese token.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Severity
severity: high
Reproducibility
reproducible: always
Regression
regression: yes
Affects latest release
latest-release: yes
User story
As a CS2 server administrator, I want the GSLT I enter during install to be used by the server, so that players can join it from the internet.
Script name
cs2server
Game
Counter-Strike 2
Linux distro
Debian 12
Command
command: install, command: start
Expected behavior
The GSLT entered at the GSLT TOKEN: prompt during install (stored as gslt in lgsm/config-lgsm/cs2server/cs2server.cfg) is passed to the server, and the console shows:
Logging into Steam gameserver account with logon token 'XXXXXXXX...'
Actual behavior
The token is stored but never reaches the server. The server logs into an anonymous game server account and only accepts LAN connections:
* No Steam account token was specified. *
* Logging into anonymous game server account. *
* Connections will be restricted to LAN only. *
Further information
install_gslt.sh asks for the token, writes it to lgsm/config-lgsm/cs2server/cs2server.cfg and tells the user that the GSLT can be changed there. But the cs2server startparameters in lgsm/config-default/config-lgsm/cs2server/_default.cfg (line 24) never uses ${gslt}:
startparameters="-dedicated -ip ${ip} -port ${port} -maxplayers ${maxplayers} -authkey ${wsapikey} +exec ${selfname}.cfg"
No module passes the token on either: sv_setsteamaccount does not appear anywhere in lgsm/modules/. The other 11 Source servers with a GSLT (csgo, css, tf2, gmod, ...) all have +sv_setsteamaccount ${gslt} in their startparameters.
How it got here:
- f33bfdf4 (2023-10-27): cs2server started with
+sv_setsteamaccount ${gslt}in its start parameters. - 2fff61f4 (#4405, 2024-01-19): the parameters, including
gslt, were moved into the game server config. The CS2server.cfgtemplate in Game-Server-Configs has ansv_setsteamaccount ""line. #4457 reported the missing parameters and was closed with "The CS2 start parameters were merged into the config file". - cac8b81a (2024-10-06):
gslt=""was added back to the cs2server config, so the installer prompts for the token again (command_install.shchecks[ -v gslt ]). But it was not added back tostartparameters, so the token entered at the prompt is ignored.
Today the token only works if it is also typed by hand into the sv_setsteamaccount line of serverfiles/game/csgo/cfg/cs2server.cfg. The installer does not mention this.
I tested where the parameter can go (fresh cs2server install, startparameters overridden in the instance config):
| Test | Token location | Order | Result |
|---|---|---|---|
| A | LinuxGSM gslt |
+exec ${selfname}.cfg +sv_setsteamaccount ${gslt} |
logon token |
| B | LinuxGSM gslt |
+sv_setsteamaccount ${gslt} +exec ${selfname}.cfg |
anonymous |
| C | game server config only, gslt="" |
+exec ${selfname}.cfg +sv_setsteamaccount ${gslt} |
Usage: sv_setsteamaccount <login_token>, then logon token |
B fails because the game server config template sets sv_setsteamaccount "", which clears a token set before it. Test A also shows that the Steam login happens after all command-line commands, even though the game server config contains a map line. Test C shows that an empty gslt only prints the usage line, so servers that set the token in the game server config keep working.
Suggested fix: add +sv_setsteamaccount ${gslt} after +exec ${selfname}.cfg. I will open a PR for it.
Pre-checks
- I ran update and validate before reporting this issue.
Reproduced on a fresh install on Debian 12.15 (bookworm) x86_64.
Relevant log output
$ grep -A8 "SteamGameServer_Init" log/console/cs2server-console.log
SteamGameServer_Init() OK, logging on to Steam
****************************************************
* *
* No Steam account token was specified. *
* Logging into anonymous game server account. *
* Connections will be restricted to LAN only. *
* *
* To create a game server account go to *
* http://steamcommunity.com/dev/managegameservers *
Steps to reproduce
- Run
./linuxgsm.sh cs2serverand./cs2server install, and enter a valid GSLT at theGSLT TOKEN:prompt. - Check that
lgsm/config-lgsm/cs2server/cs2server.cfgcontainsgslt="<token>". - Run
./cs2server start. - Run
grep -E "logon token|anonymous game server" log/console/cs2server-console.log: the anonymous login banner is shown. - Run
./cs2server details: the command-line parameters do not contain+sv_setsteamaccount.
🤖 Generated with Claude Code
- Lenguaje dominante
- Shell
- Estrellas
- 4.9k
- Forks
- 871
- Merge medio
- 20 h 45 min
- PR fusionados (30 d)
- 112
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de GameServerManagers/LinuxGSM
-
[Bug]: csserver metamod fails to load amxmodx after ubuntu 26.04 base imagePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertocommand: mods command: start distro: Ubuntu regression: yes reproducible: always severity: medium status: fixed in develop type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
GameServerManagers/LinuxGSM#5114 ·
Los mantenedores suelen responder en 1 día
-
[Server Request]: Battlefront EternalPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertodistro: Debian distro: Ubuntu info: systemd type: game server request
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
GameServerManagers/LinuxGSM#5112 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Server Request]: TTT ClassicAbiertostatus: linux support confirmed type: game server request
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
GameServerManagers/LinuxGSM#5110 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
command: start engine: unity3d game: Assetto Corsa priority: high scope: single game type: feature
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
GameServerManagers/LinuxGSM#5099 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: two update runs can run at the same time and break each other's SteamCMD downloadPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoengine: source game: Team Fortress 2 game: Team Fortress 2 Classified info: docker info: steamcmd type: bug
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
GameServerManagers/LinuxGSM#5094 ·
Los mantenedores suelen responder en 1 día
Todos los issues de GameServerManagers/LinuxGSM
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
IceWhaleTech/ZimaOS#639 ·
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
containers/podman-compose#1607 ·
Los mantenedores suelen responder en 4 días
-
Chase latest GoreleaserAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
super-linter/super-linter#8230 ·
Los mantenedores suelen responder en 1 día
-
Container builds fail on Fedora/Rocky: kernel-devel-$(uname -r) has no matchPosiblemente ocupada @fitzyracing1 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
-
🎙️ task - fix(git.commit.set): let a chore(deps) commit lead a branch before its first fix/featAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
ehmpathy/rhachet-roles-ehmpathy#1213 ·
Los mantenedores suelen responder en 1 día