wesnothd external auth
Moderator: Forum Moderators
Forum rules
Before reporting issues in this section, you must read the following topic:
Before reporting issues in this section, you must read the following topic:
-
- Posts: 15
- Joined: December 23rd, 2010, 6:53 pm
wesnothd external auth
Would like to see if someone could help me with a problem I've been having. I have been trying to get wesnothd to authenticate against an external database.
This is what I have in my config file:
ban_save_file="/usr/local/bin/bans"
connections_allowed=50
passwd=********
save_replays=true
versions_accepted="1.8.*"
user_handler=forum
[mail]
server=www.mcnigel.net
username=administrator@mcnigel.net
password=********
from_address=administrator@mcnigel.net
mail_port=25
[/mail]
[user_handler]
db_host="www.mcnigel.net"
db_name="phpbb"
db_user="wesnothd"
db_password="**********"
db_users_table="phpbb_users"
db_extra_table="wesnothd"
[/user_handler]
(passwords starred out)
I launch wesnothd with the -c option, pointing to the config file and all of the other changes load correctly (bans file, passwd, version check), but the software ignores the external authentication.
All of the db info points to a phpbb v3.0.9 forum, with the extra table being created using the info the the ubuntu man page that has been linked in this forum several times.
I have installed all of the necessary software to compile, including mysql-devel, and it compiles without issue using autotools, cmake, and scons, but every time I run it, it just lets in users (whether dul is turned on or off).
I have looked far and wide for a solution to this, but, unfortunately, documentation on wesnothd is hard to find.
The only thing I have to go on is:
When opened in NetBeans, the forum_user_handler.cpp shows a #ifdef HAVE MYSQLPP, and everything is grayed out after that (but not commented). Note: I have made sure that mysql.h is in the c++ include path, and the include in forum_user_handler.hpp shows that it can find it.
OS: Fedora 12
Wesnoth version: freshly downloaded 1.8.6
Preferred build system: autotools
Any help would be appreciated.
Side question: user registration is not available in wesnothd; why? The official servers can do it, so why can't we do it in production? Can't you give us the same code that runs the official servers?
This is what I have in my config file:
ban_save_file="/usr/local/bin/bans"
connections_allowed=50
passwd=********
save_replays=true
versions_accepted="1.8.*"
user_handler=forum
[mail]
server=www.mcnigel.net
username=administrator@mcnigel.net
password=********
from_address=administrator@mcnigel.net
mail_port=25
[/mail]
[user_handler]
db_host="www.mcnigel.net"
db_name="phpbb"
db_user="wesnothd"
db_password="**********"
db_users_table="phpbb_users"
db_extra_table="wesnothd"
[/user_handler]
(passwords starred out)
I launch wesnothd with the -c option, pointing to the config file and all of the other changes load correctly (bans file, passwd, version check), but the software ignores the external authentication.
All of the db info points to a phpbb v3.0.9 forum, with the extra table being created using the info the the ubuntu man page that has been linked in this forum several times.
I have installed all of the necessary software to compile, including mysql-devel, and it compiles without issue using autotools, cmake, and scons, but every time I run it, it just lets in users (whether dul is turned on or off).
I have looked far and wide for a solution to this, but, unfortunately, documentation on wesnothd is hard to find.
The only thing I have to go on is:
When opened in NetBeans, the forum_user_handler.cpp shows a #ifdef HAVE MYSQLPP, and everything is grayed out after that (but not commented). Note: I have made sure that mysql.h is in the c++ include path, and the include in forum_user_handler.hpp shows that it can find it.
OS: Fedora 12
Wesnoth version: freshly downloaded 1.8.6
Preferred build system: autotools
Any help would be appreciated.
Side question: user registration is not available in wesnothd; why? The official servers can do it, so why can't we do it in production? Can't you give us the same code that runs the official servers?
Re: wesnothd external auth
Can you log in as a registered user without a password? That's the first thing that should be blocked. Disallowing other users is a separate setting.
The user interface may have a register button, but the server can't actually register new users. It points you to the forum instead.
The user interface may have a register button, but the server can't actually register new users. It points you to the forum instead.
-
- Posts: 15
- Joined: December 23rd, 2010, 6:53 pm
Re: wesnothd external auth
Any usernames (including those in the database) can login without passwords. There is no indication during login that it is even checking MySQL.
Re: wesnothd external auth
Did you make sure to compile wesnothd with forum user handler support enabled?
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
-
- Posts: 15
- Joined: December 23rd, 2010, 6:53 pm
Re: wesnothd external auth
I did in scons, but I'm really not familiar with it. What is the option in autotools?
Re: wesnothd external auth
Apparently none, it’s probably unsupported. You should really use scons or cmake instead — the autotools scripts are, in fact, gone in recent development versions.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
-
- Posts: 15
- Joined: December 23rd, 2010, 6:53 pm
Re: wesnothd external auth
OK, what is the cmake command for enabling the forum authentication?
I have tried scons forum_user_handler=true, but that gives me the same result.
I have tried scons forum_user_handler=true, but that gives me the same result.
- loonycyborg
- Windows Packager
- Posts: 295
- Joined: April 1st, 2008, 4:45 pm
- Location: Russia/Moscow
Re: wesnothd external auth
forum_user_handler=true should be enough, at least as far as compilation is concerned.
"meh." - zookeeper
-
- Posts: 15
- Joined: December 23rd, 2010, 6:53 pm
Re: wesnothd external auth
Nope, every other option works, but forum_user_handler appears to have no effect.
-
- Posts: 15
- Joined: December 23rd, 2010, 6:53 pm
Re: wesnothd external auth
Sorry, wasn't familiar with scons, got it to work, but would still like to know how to do it in cmake...
Re: wesnothd external auth
It seems like the cmake system is missing that option.