[0.17.1] Headless servers can have no admins

Bugs that are actually features.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

[0.17.1] Headless servers can have no admins

Post 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.
User avatar
Yenz
Inserter
Inserter
Posts: 40
Joined: Thu Dec 14, 2017 9:16 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post 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.
XboxWink
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Feb 27, 2019 9:23 pm
Contact:

Re: [0.17.1] Headless servers can have no admins

Post by XboxWink »

Same issue. I enjoy having a server hosted but I would like to make myself and a couple others admins.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post 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 9673 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
]
Rseding91
Factorio Staff
Factorio Staff
Posts: 14250
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post 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.
If you want to get ahold of me I'm almost always on Discord.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post 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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14250
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post 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.
If you want to get ahold of me I'm almost always on Discord.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post 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).
Rseding91
Factorio Staff
Factorio Staff
Posts: 14250
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post by Rseding91 »

The server attaches to what ever console you launch it from.
If you want to get ahold of me I'm almost always on Discord.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post 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.
User avatar
Yenz
Inserter
Inserter
Posts: 40
Joined: Thu Dec 14, 2017 9:16 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post 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.
quyxkh
Smart Inserter
Smart Inserter
Posts: 1031
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post 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.
Xeridanus
Burner Inserter
Burner Inserter
Posts: 9
Joined: Fri Mar 25, 2016 11:57 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post 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?
Rseding91
Factorio Staff
Factorio Staff
Posts: 14250
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post 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.
If you want to get ahold of me I'm almost always on Discord.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post 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.
Post Reply

Return to “Not a bug”