GameServerManagers / GameServerManagers/LinuxGSM

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

Open
#4,117 3 comments 4 reactions 0 assignees View on GitHub
command: console command: details command: install command: monitor command: restart command: start command: stop command: update command: validate game: Minecraft Bedrock game: Satisfactory info: steamcmd
Dominant language
Shell
Stars
4.9k
Forks
864
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.