Page 1 of 1

[0.17.1] Headless servers can have no admins

Posted: Wed Feb 27, 2019 4:38 pm
by DRY411S
Unless a server-adminlist.json is present, a headless server seems to start with no admins.

If the file does not exist, I would have thought that the file should be created with the name of the user who provides credentials in the server-settings.json file.

Or that there is an example file with the distribution, so that people know to populate it.

Re: [0.17.1] Headless servers can have no admins

Posted: Wed Feb 27, 2019 10:22 pm
by Yenz
Having the same issue - anybody knows the structure of the new json file?

Side note to this issue: If not having a server config and the default one is created it still has the "admins" line at the end.

Re: [0.17.1] Headless servers can have no admins

Posted: Wed Feb 27, 2019 10:36 pm
by XboxWink
Same issue. I enjoy having a server hosted but I would like to make myself and a couple others admins.

Re: [0.17.1] Headless servers can have no admins

Posted: Wed Feb 27, 2019 11:00 pm
by DRY411S
Yenz wrote: Wed Feb 27, 2019 10:22 pm Having the same issue - anybody knows the structure of the new json file?

Side note to this issue: If not having a server config and the default one is created it still has the "admins" line at the end.
Workaround:

You can create a file with your factorio client if you pretend to Host a server

Multiplayer -> Host New Game -> Play -> then the Admin List editor
adminlist.png
adminlist.png (45.2 KiB) Viewed 9675 times
You can then upload this file to your headless server, remembering to add you own name first!

The file is in the same folder as your log.

Format appears to be

Code: Select all

[
"admin",
"admin",
etc
]

Re: [0.17.1] Headless servers can have no admins

Posted: Thu Feb 28, 2019 4:13 am
by Rseding91
Thanks for the report however this is working correctly: a server can have no admins. You can promote people through the server console if you want to have admins or manually place the server-admins.json file.

Re: [0.17.1] Headless servers can have no admins

Posted: Thu Feb 28, 2019 7:34 am
by DRY411S
Rseding91 wrote: Thu Feb 28, 2019 4:13 am Thanks for the report however this is working correctly: a server can have no admins. You can promote people through the server console if you want to have admins or manually place the server-admins.json file.
It's server-adminlist.json

And you can't promote admins at the server console if there are no admins by default.

If that's the case can I respectfully suggest that it's planned for one of the upstream releases that it includes a sample server-adminlist.json file, and that the server-setting.json stops including the (we now realise) [admins] section.

Re: [0.17.1] Headless servers can have no admins

Posted: Thu Feb 28, 2019 7:43 am
by Rseding91
You can promote anyone from the server console. Not the *in-game* console - that's the in-game console. The *server* console - where you launched the process to start with.

Re: [0.17.1] Headless servers can have no admins

Posted: Thu Feb 28, 2019 7:50 am
by DRY411S
Rseding91 wrote: Thu Feb 28, 2019 7:43 am You can promote anyone from the server console. Not the *in-game* console - that's the in-game console. The *server* console - where you launched the process to start with.
OK I thought you must mean the in-game console, because there's no server console when launching headless server (which is in the title of the bug report).

Re: [0.17.1] Headless servers can have no admins

Posted: Thu Feb 28, 2019 8:39 am
by Rseding91
The server attaches to what ever console you launch it from.

Re: [0.17.1] Headless servers can have no admins

Posted: Thu Feb 28, 2019 11:42 am
by DRY411S
OK we are getting stuck on syntax, so let's deal in facts.

In 0.16 if I launched a server in headless mode with my credentials in server-settings.json then I was automatically an admin.

If I do the same with 0.17, I am not.

In both cases, the server-settings.json contains an admins section.

In 0.17, editing this section, it has zero effect.

Instead in 0.17 a server-adminlist.json has to be created.

The 0.17 distribution does not have an example layout of this.

There ARE workarounds.

It's certainly a change in behaviour in server startup, that admin rights aren't inherited by the user whose credentials are in the settings file.

Suggestion (not fact)

If it's not a bug, and is working as intended, can the QUALITY of the release be improved to avoid the confusion of unused fields in server-settings.json, and a sample server-adminlist.json be added?

It's minor, definitely low priority, but could be an improvement.

Re: [0.17.1] Headless servers can have no admins

Posted: Thu Feb 28, 2019 12:28 pm
by Yenz
Putting the correct format and an example into the wiki might be a good idea.

+1 for removing "admins" from server-settings.json
and +1 for creating an empty server-adminlist.json file if no one exists. (I'm not sure if that is the case alredy?)

This is indeed no bug and working as intended. For myself I had another issue realted to this (server-adminlist.json not working despite correctly formated), but this was due to a missing startup parameter by the docker image i'm using to host my server.

Re: [0.17.1] Headless servers can have no admins

Posted: Sun Mar 03, 2019 4:08 pm
by Atraps003

Re: [0.17.1] Headless servers can have no admins

Posted: Sat Apr 06, 2019 8:53 pm
by quyxkh
As of 0.17.25 this is still questionable.

Code: Select all

$ grep '[{}]\|admins' data/server-settings.example.json
{
  "_comment_max_players": "Maximum number of players allowed, admins can join even a full server. 0 means unlimited.",
  {
  },
  "_comment_allow_commands": "possible values are, true, false and admins-only",
  "allow_commands": "admins-only",
  "only_admins_can_pause_the_game": true,
  "_comment_admins": "List of case insensitive usernames, that will be promoted immediately",
  "admins": []
}
I don't see how "_comment_admins" in particular could possibly be more misleading if it tried, and there is no server-adminlist.example.json, no way to discover the correct setting without wiki trawling.

Re: [0.17.1] Headless servers can have no admins

Posted: Fri Apr 19, 2019 8:22 am
by Xeridanus
This problem is exascerbated by the fact that some hosts such as clanhost don't offer access to the servers console, unless you want us to type it as part of the command line to start the server. That seems clunky and unintuitive given we can see the "admins" : [] in the server settings json.

Thank you to the other players here for helping but I still can't get admin permissions on my server. I tried adding --server-adminlist server-adminlist.json to the command line that starts the server with no luck. Any suggetions for what I should try?

Re: [0.17.1] Headless servers can have no admins

Posted: Fri Apr 19, 2019 3:59 pm
by Rseding91
The supported way to promote players on a server when no one is an admin is to do it via the console. If a server host doesn't offer access to the console then don't use that host.

Re: [0.17.1] Headless servers can have no admins

Posted: Fri Apr 19, 2019 4:54 pm
by DRY411S
Rseding91 wrote: Fri Apr 19, 2019 3:59 pm The supported way to promote players on a server when no one is an admin is to do it via the console. If a server host doesn't offer access to the console then don't use that host.
I'm confused what you mean by the console. Presumably not the chat window? Because if the server starts headless with no admins named in the JSON file, then the /promote command is not available to anybody.