[0.17.1] Headless servers can have no admins

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

[0.17.1] Headless servers can have no admins

Post by DRY411S » Wed Feb 27, 2019 4:38 pm

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.

Yenz
Burner Inserter
Burner Inserter
Posts: 12
Joined: Thu Dec 14, 2017 9:16 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post by Yenz » 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.

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 » Wed Feb 27, 2019 10:36 pm

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: 599
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post by DRY411S » Wed Feb 27, 2019 11:00 pm

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 318 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: 8840
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post by Rseding91 » 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.
If you want to get ahold of me I'm almost always on Discord.

User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 599
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post by DRY411S » Thu Feb 28, 2019 7:34 am

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: 8840
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post by Rseding91 » 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.
If you want to get ahold of me I'm almost always on Discord.

User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 599
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post by DRY411S » Thu Feb 28, 2019 7:50 am

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: 8840
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post by Rseding91 » Thu Feb 28, 2019 8:39 am

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: 599
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post by DRY411S » Thu Feb 28, 2019 11:42 am

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.

Yenz
Burner Inserter
Burner Inserter
Posts: 12
Joined: Thu Dec 14, 2017 9:16 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post by Yenz » Thu Feb 28, 2019 12:28 pm

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
Filter Inserter
Filter Inserter
Posts: 708
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post by quyxkh » Sat Apr 06, 2019 8:53 pm

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: 5
Joined: Fri Mar 25, 2016 11:57 am
Contact:

Re: [0.17.1] Headless servers can have no admins

Post by Xeridanus » Fri Apr 19, 2019 8:22 am

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?

Post Reply

Return to “Not a bug”

Who is online

Users browsing this forum: boran_blok and 1 guest