Outils pour utilisateurs

Outils du site


en:suckerserv:auth

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
en:suckerserv:auth [2011/06/17 21:14] – created piernoven:suckerserv:auth [2014/10/26 22:28] (Version actuelle) – [SuckerServ] piernov
Ligne 1: Ligne 1:
-====== Auth with HopMod-v4 ====== +====== Auth with SuckerServ-v5 ====== 
-Because Authserver isn't included anymore in HopMod-v4, you'll need to clone the trunk repository:+Because Authserver isn't included anymore in SuckerServ-v5, you'll need to checkout the suckerserv-v3 repository, or use MasterLua (new Master/Auth server, not described here):
 <code bash> <code bash>
-svn checkout http://hopmod.googlecode.com/svn/trunkhopmod-trunk +svn co http://suckerserv.googlecode.com/svn/branches/suckerserv-v3 
-cd hopmod-trunk+cd suckerserv-v3
 </code> </code>
 ===== Dependencies ===== ===== Dependencies =====
Ligne 9: Ligne 9:
 If you want to use a MySQL Database, you'll need : If you want to use a MySQL Database, you'll need :
   * a working MySQL server, with a dedicated database and user for the authserver.   * a working MySQL server, with a dedicated database and user for the authserver.
-  * the MySQL-Client headers (mysql.h), commonly //''libmysqlclient-dev''// package.+  * the MySQL-Client header (mysql.h), commonly //''libmysqlclient-dev''// package.
 ==== With SQLite3 ==== ==== With SQLite3 ====
-All requiered dependencies are shipped with HopMod+All requiered dependencies are shipped with SuckerServ
 ==== With a text database ==== ==== With a text database ====
 No dependencies requiered No dependencies requiered
Ligne 19: Ligne 19:
 chmod +x compile.sh chmod +x compile.sh
 ./compile.sh ./compile.sh
-</code> 
-=== With MySQL === 
-<code bash> 
-cd release_build 
-make luasql_mysql 
-cp src/luasql/libluasql_mysql.so ../lib 
 </code> </code>
 ===== Configuration ===== ===== Configuration =====
Ligne 36: Ligne 30:
 Edit the conf/authserver.conf file, and remove the # at the beginning of this line:  Edit the conf/authserver.conf file, and remove the # at the beginning of this line: 
 <code bash>#use_mysql_database "hostname" "port" "database" "username" "password" "install_db"</code> <code bash>#use_mysql_database "hostname" "port" "database" "username" "password" "install_db"</code>
 +Set correctly the hostname (localhost by default), the port (3306 by default), the database, the username, the password and remove "install_db" if the database schemas and triggers are already installed into the database. \\
 Add a # at the beginning of this one: Add a # at the beginning of this one:
 <code bash>use_text_database "./log/auths.txt"</code> <code bash>use_text_database "./log/auths.txt"</code>
-==== HopMod ==== +==== SuckerServ ====
-All ''localhost:login'' and ''localhost:admin'' should be replaced by your own domain+
 === Auth.lua === === Auth.lua ===
-Add an ''auth.lua'' file in the conf/ directory of your HopMod installation, with the following :+Add an ''auth.lua'' file in the conf/ directory of your SuckerServ installation if there's not one already, with the following :\\ 
 +**WARNING:** Don't use `localhost` as hostname since it's broken. Use `127.0.0.1` instead.
 <code lua auth.lua> <code lua auth.lua>
 auth.directory.server{ auth.directory.server{
-    id = "localhost", +    id = "suckerserv", 
-    hostname = "localhost",+    hostname = "127.0.0.1",
     port = 28787     port = 28787
 } }
  
 auth.directory.domain{ auth.directory.domain{
-    id = "localhost:login", +    id = "suckerserv", 
-    server = "localhost"+    server = "suckerserv"
 } }
  
 auth.directory.domain{ auth.directory.domain{
-    id = "localhost:admin", +    id = "suckerserv:master", 
-    server = "localhost"+    server = "suckerserv" 
 +
 + 
 +auth.directory.domain{ 
 +    id = "suckerserv:admin", 
 +    server = "suckerserv"
 } }
 </code> </code>
Ligne 66: Ligne 66:
 ############################################################################### ###############################################################################
  
-admin_domains "localhost:admin"           # Domain for admin +admin_domains "suckerserv:admin"            # Domain for admin 
-invadmin_domains "localhost:admin"        # Same +invadmin_domains "suckerserv:admin"         # Same 
-auto_invadmin_domains "localhost:admin"   # Same, if you want to be auto-invadmin at connection +auto_invadmin_domains "suckerserv:admin"    # Same, if you want to be auto-invadmin at connection
-name_reservation_domain "localhost:login" # Domain for name protect+
  
-stats_use_auth 1                          Use auth with stats +master_domains "suckerserv:master"          Domain for master 
-stats_auth_domain "localhost:login      # Domain for auth +invmaster_domains "suckerserv:master      # Same 
-stats_overwrite_name_with_authname 1      Replace current name with authkey name in stats+auto_invmaster_domains "suckerserv:master"  Same, if you want to be auto-invadmin at connection
  
-module "auth/name"                        # Module for name protect +name_reservation_domain "suckerserv"        # Domain for name protect 
-module "auth/invadmin"                    # Module for auto-invadmin+auth_domains "suckerserv"                   # Domain for privileges with new authserver 
 + 
 +module "auth/name"                          # Module for name protect 
 +module "auth/invmaster"                     # Module for auto-invmaster 
 +module "auth/invadmin"                      # Module for auto-invadmin 
 +#module "auth/privileges"                   # New privileges module to set inv-master/admin with new authserver. Disable auth/invadmin and auth/invmaster before enabling this 
 </code> </code>
 ===== Using authserver ===== ===== Using authserver =====
 +==== With MySQL ====
 +Run once the authserver, and then remove the ''install_db'' in your authserver.conf
 ==== Run it ==== ==== Run it ====
 To launch the authserver, just do: To launch the authserver, just do:
 <code bash>./bin/authserver start</code> <code bash>./bin/authserver start</code>
-In the hopmod-trunk directory+In the suckerserv-v3 directory
 ==== Adding domains ==== ==== Adding domains ====
-<code bash>./bin/authserver manage domain add "localhost:login" case_insensitive</code> +<code bash>./bin/authserver manage domain add "suckerserv" case_insensitive</code> 
-<code bash>./bin/authserver manage domain add "localhost:admin" case_insensitive</code>+<code bash>./bin/authserver manage domain add "suckerserv:master" case_insensitive</code> 
 +<code bash>./bin/authserver manage domain add "suckerserv:admin" case_insensitive</code>
 ==== Adding users ==== ==== Adding users ====
 Before adding users, you have to add domains, described before.\\ Before adding users, you have to add domains, described before.\\
Ligne 92: Ligne 99:
 Then copy the output. The first line is the private key, the one that you have to give to the user.\\ Then copy the output. The first line is the private key, the one that you have to give to the user.\\
 The user add something like this: The user add something like this:
-<code bash>authkey "the_user" "private_key" "localhost:login"</code>+<code bash>authkey "the_user" "private_key" "suckerserv"</code>
 in his auth.cfg\\ in his auth.cfg\\
 The second line is the public_key, you have to add it in the database: The second line is the public_key, you have to add it in the database:
-<code bash>./bin/authserver manage user add "the_user" "localhost:login" "public_key"</code> +<code bash>./bin/authserver manage user add "the_user" "suckerserv" "public_key"</code> 
-Now same for admin, but replace the domain by your admin domain:\\+Now same for master, but replace the domain by your master domain:\\ 
 +The master add this in his auth.cfg 
 +<code bash>authkey "the_admin" "private_key" "suckerserv:master"</code> 
 +And in the server: 
 +<code bash>./bin/authserver manage user add "the_user" "suckerserv:master" "public_key"</code> 
 +And same for admin, but replace the domain by your admin domain:\\
 The admin add this in his auth.cfg The admin add this in his auth.cfg
-<code bash>authkey "the_admin" "private_key" "localhost:admin"</code>+<code bash>authkey "the_admin" "private_key" "suckerserv:admin"</code>
 And in the server: And in the server:
-<code bash>./bin/authserver manage user add "the_user" "localhost:admin" "public_key"</code>+<code bash>./bin/authserver manage user add "the_user" "suckerserv:admin" "public_key"</code>
 Remember, an authkey is unique, so don't loose it, and create one for each user. Remember, an authkey is unique, so don't loose it, and create one for each user.
 ==== Restart the authserver ==== ==== Restart the authserver ====
-After adding an authkey, it's safe to restart the authserver:+After adding an authkey, you have to restart the authserver:
 <code bash>./bin/authserver stop</code> <code bash>./bin/authserver stop</code>
 <code bash>./bin/authserver start</code> <code bash>./bin/authserver start</code>
 ===== In-Game ===== ===== In-Game =====
-Now, all admin, (added in the previous section) should be set automatically to invadmin.\\+Now, all admins (added in the previous section) should be set automatically to invadmin, and all masters to invmaster.\\
 And all users must have their authkey for the server doesn't change their name.\\ And all users must have their authkey for the server doesn't change their name.\\
 And all stats are recorded into single name, even changing it or IP, if you keep the authkey.\\ And all stats are recorded into single name, even changing it or IP, if you keep the authkey.\\
en/suckerserv/auth.1308338074.txt.bz2 · Dernière modification : 2014/05/31 00:26 (modification externe)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki