[GH-ISSUE #4117] [Guide]: Steamcmd Username + Steam Guard via Smartphone (compatible with LinuxGSM, no plaintext password) w/ securely saved credentials #2626

Open
opened 2026-02-27 03:04:11 +03:00 by kerem · 3 comments
Owner

Originally created by @codefaux on GitHub (Feb 18, 2023).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/4117

User story

As a server admin, I wanted to install a Terraria server. I didn't have a second account, didn't want plaintext password, and am using SteamGuard via Smartphone. This is listed as unsupported, but I accomplished it without a single extra tool. Being security-minded, I refuse to leave plaintext credentials, but obviously desire all functionality provided by LGSM.

Game

Terraria, 7 Days, Satisfactory, Proj. Zomboid, Minecraft Bedrock, probably more later

Linux distro

Other

Command

command: start, command: stop, command: restart, command: monitor, command: details, command: update, command: validate, command: console, command: install

Further information

First, requirements:

  • Understand and edit lgsm config files
  • Understand and execute steamcmd by hand as intended gameserver user

OK, so here's what I did. I imagine this could be adapted to any server requiring login. All commands are AS DESIRED GAME SERVER USER
1- Download and install terraria lgsm server per Instructions step 1 and step 2
2- Run ./terrariaserver install to create base folders/config files, will fail due to missing login
image

3- Run SteamCMD -- possibly must use ~/.steam/steamcmd/steamcmd.sh (* This is as it was on my system ie ArchLinux, not sure if it'll be identical everywhere -- may need to use this version instead of package manager version due to saved data location? Unable to verify, need testers!)
4- Initiate login -- in my case using SteamGuard -- login <username>
4b- Complete login securely, aka provide password and authenticate via smartphone
5- Enable stored credential login when using 'login' command without password (Advised/explained by SteamCMD in 'help login'! Read this to understand the mechanism!) via running @NoPromptForPassword 1
5b- Exit SteamCMD exit
image

6- Edit server config; provide username, LEAVE PASSWORD EMPTY nano lgsm/config-default/config-lgsm/terrariaserver/_default.cfg -- NOTE: It SAYS to edit a different file, but I find that when I do, the lgsm script overwrites it with the default when I run install. Thus, I edit the stored default, which then copies itself to the proper location. Any input would be appreciated. NOTE2: No, I don't wish to discuss my preference of console editor.
image

7- Install server, update/verify/etc as usual!
image
image

  • No changes to LGSM core.
  • No extra tools.
  • No sketchy stored credentials.
  • Works with any SteamCMD server requiring login/ownership.
  • Does not require an extra dummy account.
  • Only info leakage via LGSM tooling/config files is Steam username

Relevant log output

(Provided as screenshots)

Steps to reproduce

...also provided above, my bad

Originally created by @codefaux on GitHub (Feb 18, 2023). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/4117 ### User story As a server admin, I wanted to install a Terraria server. I didn't have a second account, didn't want plaintext password, and am using SteamGuard via Smartphone. This is listed as unsupported, but I accomplished it without a single extra tool. Being security-minded, I refuse to leave plaintext credentials, but obviously desire all functionality provided by LGSM. ### Game Terraria, 7 Days, Satisfactory, Proj. Zomboid, Minecraft Bedrock, probably more later ### Linux distro Other ### Command command: start, command: stop, command: restart, command: monitor, command: details, command: update, command: validate, command: console, command: install ### Further information First, requirements: - Understand and edit lgsm config files - Understand and execute steamcmd by hand as intended gameserver user OK, so here's what I did. I imagine this could be adapted to any server requiring login. All commands are AS DESIRED GAME SERVER USER 1- Download and install terraria lgsm server per [Instructions](https://linuxgsm.com/servers/terrariaserver/#v-pills-install) step 1 and step 2 2- Run `./terrariaserver install` to create base folders/config files, will fail due to missing login ![image](https://user-images.githubusercontent.com/42219549/219900077-bf32d7aa-e66d-4daf-bbc7-1449abfc28ed.png) 3- Run SteamCMD -- possibly must use ` ~/.steam/steamcmd/steamcmd.sh` (* This is as it was on my system ie ArchLinux, not sure if it'll be identical everywhere -- may need to use this version instead of package manager version due to saved data location? Unable to verify, need testers!) 4- Initiate login -- in my case using SteamGuard -- `login <username>` 4b- Complete login securely, aka provide password and authenticate via smartphone 5- Enable stored credential login when using 'login' command without password (Advised/explained by SteamCMD in 'help login'! Read this to understand the mechanism!) via running `@NoPromptForPassword 1` 5b- Exit SteamCMD `exit` ![image](https://user-images.githubusercontent.com/42219549/219900647-0a7f45ed-8414-4d38-8fbb-a4161483c8a8.png) 6- Edit server config; provide username, LEAVE PASSWORD EMPTY `nano lgsm/config-default/config-lgsm/terrariaserver/_default.cfg` -- NOTE: It SAYS to edit a different file, but I find that when I do, the lgsm script overwrites it with the default when I run install. Thus, I edit the stored default, which then copies itself to the proper location. Any input would be appreciated. NOTE2: No, I don't wish to discuss my preference of console editor. ![image](https://user-images.githubusercontent.com/42219549/219900322-729bb607-1f67-4914-b0e6-07dbac4d20db.png) 7- Install server, update/verify/etc as usual! ![image](https://user-images.githubusercontent.com/42219549/219900411-829e07c0-3168-4f11-9d32-f4c5494a4c29.png) ![image](https://user-images.githubusercontent.com/42219549/219900489-0dfc3e60-230a-40b3-99d1-15a06693f3eb.png) - No changes to LGSM core. - No extra tools. - No sketchy stored credentials. - Works with any SteamCMD server requiring login/ownership. - Does not require an extra dummy account. - Only info leakage via LGSM tooling/config files is Steam username ### Relevant log output ```shell (Provided as screenshots) ``` ### Steps to reproduce ...also provided above, my bad
Author
Owner

@dgibbs64 commented on GitHub (Feb 19, 2023):

NoPromptForPassword looks like it might be a useful setting for storing steamcmd credentials rather than the traditional method. I think this would be a good feature to add.

<!-- gh-comment-id:1435968577 --> @dgibbs64 commented on GitHub (Feb 19, 2023): NoPromptForPassword looks like it might be a useful setting for storing steamcmd credentials rather than the traditional method. I think this would be a good feature to add.
Author
Owner

@dgibbs64 commented on GitHub (Sep 1, 2023):

I have got the basic concept working so the no password feature works. However, I need to figure out how to implement on the installer and auto installer. As well as what to do if updates fail because of loss of creds.

<!-- gh-comment-id:1703323395 --> @dgibbs64 commented on GitHub (Sep 1, 2023): I have got the basic concept working so the no password feature works. However, I need to figure out how to implement on the installer and auto installer. As well as what to do if updates fail because of loss of creds.
Author
Owner

@mastercoms commented on GitHub (Dec 20, 2024):

NoPromptForPassword doesn't do anything in this case. It doesn't get archived so setting it after logging in and then exiting has no effect. Even if it did, its only purpose is causing login to fail rather than to prompt if credentials are not cached. What's actually doing the work here is logging in to steamcmd prior and then letting it cache the credentials by providing a blank password to LGSM.

<!-- gh-comment-id:2556325455 --> @mastercoms commented on GitHub (Dec 20, 2024): NoPromptForPassword doesn't do anything in this case. It doesn't get archived so setting it after logging in and then exiting has no effect. Even if it did, its only purpose is causing login to fail rather than to prompt if credentials are not cached. What's actually doing the work here is logging in to steamcmd prior and then letting it cache the credentials by providing a blank password to LGSM.
Sign in to join this conversation.
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#2626
No description provided.