Page 1 of 1

Dedicated server and privileged users

Posted: Sun Jul 02, 2017 3:03 pm
by mase
Hi!
I am running a dedicated freeciv server on my debian machine. The freeciv server runs in
the background. How can i specify persistant privileged users for server commands?
I want to control the server from within the client. Even when logging in with the username
running the server, I am not allowed to place privileged commands.

Re: Dedicated server and privileged users

Posted: Mon Jul 03, 2017 3:55 pm
by Alien Valkyrie
If you just want to give rights to a user that already connected, you can use cmdlevel to set the privileges of a) a single connection, b) the next person to connect, c) all future connections or d) all connections (present and future).
If you want more persistent privileges, you'll have to use an authentication database. Details on how that works are in /doc/README.fcdb .

That said, when connecting a client to localhost, your connection should typically receive cmdlevel "hack".

Re: Dedicated server and privileged users

Posted: Mon Jul 03, 2017 4:15 pm
by mase
I have an auth sqlite database. Must I edit the database by hand?
The fcdb table has no field to privilege the user.
I want to privilege only a few, not all users.

Re: Dedicated server and privileged users

Posted: Mon Jul 03, 2017 4:32 pm
by Alien Valkyrie
Yup, just realized that now. I didn't actually work with fcdb, ever. That's not a feature that exists at the moment. At the end of the readme is linked hrm Feature #657143, which is about that.

Re: Dedicated server and privileged users

Posted: Mon Jul 03, 2017 4:38 pm
by mase
So it seems, that I have to work with ssh and screen at the moment. i hope, this feature will be built into the next versions.

Re: Dedicated server and privileged users

Posted: Tue Jul 04, 2017 4:37 pm
by mase
On the german wikipage http://de.freeciv.wikia.com/wiki/Installation they write, that the cmdlevel
command is automatically set on public servers. How they do that?

Re: Dedicated server and privileged users

Posted: Tue Jul 04, 2017 5:10 pm
by mase
I found a workaround for this. There is the commandline parameter --read,
where I can specify a file with server commands applied when the server starts.
So I can specify, that the first player connections gets admin rights.