Dedicated server and privileged users

Join us, meet players from all around the world, challenge the strongest top players, practice and be one of them!
mase
Posts: 10
Joined: Mon Sep 12, 2016 5:27 pm

Dedicated server and privileged users

Postby mase » Sun Jul 02, 2017 3:03 pm

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.

Caedo
Elite
Posts: 300
Joined: Sun Feb 10, 2013 10:21 pm
Location: Germany

Re: Dedicated server and privileged users

Postby Caedo » Mon Jul 03, 2017 3:55 pm

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".

mase
Posts: 10
Joined: Mon Sep 12, 2016 5:27 pm

Re: Dedicated server and privileged users

Postby mase » Mon Jul 03, 2017 4:15 pm

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.

Caedo
Elite
Posts: 300
Joined: Sun Feb 10, 2013 10:21 pm
Location: Germany

Re: Dedicated server and privileged users

Postby Caedo » Mon Jul 03, 2017 4:32 pm

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.

mase
Posts: 10
Joined: Mon Sep 12, 2016 5:27 pm

Re: Dedicated server and privileged users

Postby mase » Mon Jul 03, 2017 4:38 pm

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.

mase
Posts: 10
Joined: Mon Sep 12, 2016 5:27 pm

Re: Dedicated server and privileged users

Postby mase » Tue Jul 04, 2017 4:37 pm

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?

mase
Posts: 10
Joined: Mon Sep 12, 2016 5:27 pm

Re: Dedicated server and privileged users

Postby mase » Tue Jul 04, 2017 5:10 pm

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.