mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2026-04-25 14:15:59 +03:00
[GH-ISSUE #570] [LGSM] Get Steam Guard working correctly #460
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference
starred/LinuxGSM#460
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Dunkelzhan on GitHub (Dec 21, 2015).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/570
Originally assigned to: @UltimateByte on GitHub.
When running:
./sdtdserver install
I eventually reach a point where the install hangs:
Installing SteamCMD
SteamCMD already installed!
Redirecting stderr to '/home/sdtdserver/Steam/logs/stderr.txt'
Looks like steam didn't shutdown cleanly, scheduling immediate update check
[ 0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.
Logging in user 'REMOVED USERNAME' to Steam Public...
Enter the current code from your Steam Guard Mobile Authenticator app
Two-factor code:FB8YB
Logged in OK
Waiting for license info...OK
Installing 7 Days To Die Server
Redirecting stderr to '/home/sdtdserver/Steam/logs/stderr.txt'
[ 0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.
Logging in user 'REMOVED USERNAME' to Steam Public...
Enter the current code from your Steam Guard Mobile Authenticator app
Two-factor code:FB8YB
Where 'REMOVED USERNAME' is my correct Steam account. Steam Guard appears to authenticate correctly at the first query when installing Steam CMD, but the install hangs at a flashing cursor at the second prompt (yes, the Steam Guard code at the time was the same for both prompts).
This was my 2nd attempt at installing, hence the initial messages w/ the Steam CMD installation.
@UltimateByte commented on GitHub (Dec 22, 2015):
Hi there,
I know that pain, i also got trouble with steamguard in the past, i disabled it for those kind of things, but now it becomes pretty compulsory to enable it if you're using the market, so let's try to figure out what's happening. Sadly, i don't own that game, so i won't be able to test that.
The fact that you got 2 times the same two factor code could either be a problem or a normal behavior, as it's the same machine requesting authentication in a small amount of time.
Firsts things first, i see SteamCMD already installed! at the very beginning, so did you start for a clean install ? (ls -al to make sure there are no residual files).
The only thing i see right now is the password included into start options that could prevent steamguard from working. If so, we're gonna need an option for steamguard in server script, like
steamguard="1"
Then at install,
if [ "${steamguard}" == 1 ]; then
unset steampass
fi
So let's try clearing all files (if you have a dedicated user, go to its home folder, and do rm -R * , then ls -al to check if you need to remove more), then if it doesn't do the trick, or if you were already on a clean install, we will see what we can do.
@Dunkelzhan commented on GitHub (Dec 22, 2015):
Thank you for the reply.
Yes, I started with a clean install - I got the hang issue on my very first attempt. Subsequent attempts I tried running the install over what was already in the folder.
I apologize as I am a linux novice and I am not really following what you are saying - what files do i need to clean out of what folder?
I also added the "steamguard="1" to the server script, immediately below the username / password section - was that where I was supposed to add it?
As for your "Then at install" section, I am unsure if I need to add this to the server script, and if so, where?
@Dunkelzhan commented on GitHub (Dec 22, 2015):
Sorry for my lack of experience - I figured out your above post. For the sake of anyone as inexperienced w/ Linux as me, here is the steps I took to fix the issue (this is for Ubuntu 15.10 64-bit):
1.) Remove the "sdtdserver" user using the User Accounts application. Say yes to delete all files.
2.) Reboot.
3.) Create the "sdtdserver" user again, using the User Accounts application. Make as an admin, and add a password.
4.) Follow the instructions for the server install. At the "nano sdtdserver" step, make the following changes:
a.) Add your Steam username and password where indicated.
b.) Immediately below the password line, add steamguard="1"
c.) Scroll down and find the ##### Script ##### section (ignore the # Do not edit).
d.) Below the filedir=$(dirname "${filepath}") line, add:
if [ "${steamguard}" == 1 ]; then
unset steampass
fi
e.) Exit and save changes, then run ./sdtdserver install - have your Steam Guard code ready.
Worked for me - thank you for the assistance!
@UltimateByte commented on GitHub (Dec 22, 2015):
Glad you figured it out.
Actually the steamguard thing was a feature to propose for LGSM, not something you had to do yourself !
The easiest way may be to not enter a steampass ! It does exactly the same as the function i gave in the end. If it works that way, we can just add a comment to tell people not to use a steampass when steamguard is on, then you have to type your password manually.
I personally don't like having a password in clear text anyways.
@dgibbs64 commented on GitHub (Dec 22, 2015):
Yeah this is definitely something that needs to be worked on. I added ./steamcmd.sh without any redirect to force steamguard to show if required. Then I thought is was simply a case of entering the code and thats it.
@Dunkelzhan commented on GitHub (Dec 22, 2015):
If I comment out the steamguard="1" line and then leave the:
if [ "${steamguard}" == 1 ]; then
unset steampass
fi
lines, the server hangs anytime it tried to update SteamCMD. It will query for a steamguard code, seem to accept it, look for the license, return an ok, then hang at the
Update sdtd-server: Checking for update: SteamCMD
line. (note - i have the server configured to update on start). Just FYI.
@UltimateByte commented on GitHub (Dec 23, 2015):
OFC it gets stuck if you keep a test on a non existing variable.
What about you remove that and just don't set a steampass ?
I guess there are some checks at install to see if steampass is set or not, not sure what it'll do, but you can try.
@Dunkelzhan commented on GitHub (Dec 28, 2015):
Sorry for the delay in replying, hope everyone had happy holidays.
I had some progress this morning. Edited "sdtdserver" script so now:
Steam login
steamuser="(my account)"
steampass="(my password)"
steamguard="1"
and
if [ "${steamguard}" == 1 ]; then
unset steampass
fi
where (my account) and (my password) are correct values.
when running "./sdtdserver update" it queries for password, then Steam Guard code, pauses at the updating SteamCMD message, then passes and finds an available update:
sdtdserver@WolfeDen1:~$ ./sdtdserver update
[ OK ] Update sdtd-server: Checking for update: Server logs: No update requestedRedirecting stderr to '/home/sdtdserver/Steam/logs/stderr.txt'
[ 0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.
Logging in user '(my account)' to Steam Public...
Using cached credentials. . .
Logged in OK
Waiting for license info...OK
[ OK ] Update sdtd-server: Checking for update: SteamCMD
Update available:
Current build: 909215
Available build: 912598
Applying update...
fetching functions/fn_update_dl...FAIL
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (22) The requested URL returned error: 404 Not Found
https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/fn_update_dl
Dumps out here, with the 404 error.
@dgibbs64 commented on GitHub (Dec 28, 2015):
./sdtdserver update-functions
@Dunkelzhan commented on GitHub (Dec 28, 2015):
./sdtdserver update-functions
Returns:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (22) The requested URL returned error: 404 Not Found
https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/fn_update_functions
@dgibbs64 commented on GitHub (Dec 28, 2015):
Try again now ;-)
@Dunkelzhan commented on GitHub (Dec 28, 2015):
That worked. Now I'm getting a "Login Failure: Invalid Password" when it uses my cached credentials, and the update dumps out - how do I clear my credentials out of the cache?
@dgibbs64 commented on GitHub (Dec 28, 2015):
I would deleted the steamcmd dir myself. This is a right pain at the moment
@Dunkelzhan commented on GitHub (Dec 28, 2015):
Removing the directory, then trying to run ./sdtdserver gave me an error, saying it couldn't find commands in that directory. I assumed I needed to re-install to rebuild the steamcmd directory correctly... I backed up my installation, which finished successfully, then ran ./sdtdserver install.
The install also is trying to use the cached credentials... so I suppose they are stored somewhere other than the steamcmd directory? I confirmed this directory did not exist after deleting it.
@dgibbs64 commented on GitHub (Dec 29, 2015):
the script should detect if steamcmd dir is missing and reload it for you
@Dunkelzhan commented on GitHub (Dec 29, 2015):
I removed "steamcmd" folder with "rm -R steamcmd", confirmed folder was gone.
Ran "./sdtdserver start, SteamCMD detected as missing and installed:
sdtdserver@WolfeDen1:~$ ./sdtdserver start
[ WARN ] Starting sdtd-server: SteamCMD is missing
mkdir: created directory ‘/home/sdtdserver/steamcmd’
downloading steamcmd_linux.tar.gz...OK
linux32/
linux32/libstdc++.so.6
linux32/steamcmd
steamcmd.sh
steam.sh
removed ‘/home/sdtdserver/steamcmd/steamcmd_linux.tar.gz’
Then ran "./sdtdserver update":
sdtdserver@WolfeDen1:~$ ./sdtdserver update
Redirecting stderr to '/home/sdtdserver/Steam/logs/stderr.txt'
ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt".
[ 0%] Checking for available update...
[ 0%] Downloading update (0 of 10,335 KB)...
[ 0%] Downloading update (272 of 10,335 KB)...
[ 2%] Downloading update (2,887 of 10,335 KB)...
[ 27%] Downloading update (5,278 of 10,335 KB)...
[ 51%] Downloading update (7,396 of 10,335 KB)...
[ 71%] Downloading update (9,206 of 10,335 KB)...
[ 89%] Downloading update (10,335 of 10,335 KB)...
[100%] Download Complete.
[----] Applying update...
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Cleaning up...
[----] Update complete, launching...
Redirecting stderr to '/home/sdtdserver/Steam/logs/stderr.txt'
[ 0%] Checking for available updates...
[----] Downloading update (0 of 7,179 KB)...
[ 0%] Downloading update (996 of 7,179 KB)...
[ 13%] Downloading update (2,787 of 7,179 KB)...
[ 38%] Downloading update (3,842 of 7,179 KB)...
[ 53%] Downloading update (4,911 of 7,179 KB)...
[ 68%] Downloading update (5,969 of 7,179 KB)...
[ 83%] Downloading update (6,923 of 7,179 KB)...
[ 96%] Downloading update (7,179 of 7,179 KB)...
[100%] Download complete.
[----] Installing update...
[----] Extracting package...
[----] Extracting package...
[----] Extracting package...
[----] Installing update...
[----] Installing update...
[----] Installing update...
[----] Cleaning up...
[----] Update complete, launching Steam...
Redirecting stderr to '/home/sdtdserver/Steam/logs/stderr.txt'
[ 0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.
Logging in user 'REMOVED USERNAME' to Steam Public...
Using cached credentials. . .
Login Failure: Invalid Password
FAILED with result code 5
Failure! Error running SteamCMD
[ FAIL ] Update sdtd-server: Checking for update: SteamCMD: Not returning version info
Whereas "REMOVED USERNAME" is my correct account. No changes were made to sdtdserver file. So like I was saying, credentials have to be stored somewhere other than the SteamCMD folder, right?
@dgibbs64 commented on GitHub (Jan 1, 2016):
Im closing this issue now and merging with #579
@lock[bot] commented on GitHub (Jul 19, 2018):
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.