The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download | Blog | Stats

Modules/1.1/sqlauth

From the makers of InspIRCd.

Jump to: navigation, search

sqlauth module (InspIRCd-1.1 version)

1.1 Documentation 1.2 Documentation 2.0 Documentation 2.1 Documentation
Return to the 1.1 Module List
Description
This module allows you to allow and deny connections to your irc servers using a backend database, and is customizable to work with the majority of popular web based software. If software has both a username and a password field in one of its tables, it is likely to work with this module.
Configuration Tags
To use this module you must define a tag as shown below:
<sqlauth usertable="testusers"
        dbid="1"
        userfield="username"
        passfield="password"
        killreason="Access denied"
        encryption=""
        allowpattern="Guest*"
        useident="no"
        verbose="1">

The variables in the tag have the following meanings:

  • dbid - The database id which this module is to use. Please see the documentation of the m_mysql module for more details.
  • usertable - The table name which contains the users
  • userfield - The field name within the database which contains the username
  • passfield - The field name within the database which contains the password
  • killreason - The reason to give when disconnecting a user who provides invalid credentials. You should usually place a url to your registration system here so that users may register, or contact details of who to gain access from.
  • encryption - This variable indicates which encryption method is used on the password. If it is defined but set to an empty value no encryption is used (e.g. passwords are assumed to be plaintext, case insensitive). Common values for this when it is defined are "md5" and "passwd". Please note that this field allows for two ways to define an encryption type. The first way is to just put the name of a php function which takes one parameter, e.g. "md5" or "passwd". The second way, if you want to define a php function which takes a salt like "encrypt", is to place a bracket in the function, e.g: ENCRYPT('MYSALT',. This, when expanded, would be: ENCRYPT('MYSALT','USERPASS').
  • allowpattern - If defined, this is a pattern which if matched will automatically allow the nick onto irc without checking it against the database.
  • verbose - This variable if set to 'yes' will notify opers of failed connections to the server if they have the usermode +s.
  • useident - If this value is set (available from 1.1.23 onwards) then the ident field is used as the user's username in the query, rather than their nickname. Do not use the m_ident module if you use this setting to authenticate users, otherwise you will be unable to determine if you are checking the ident string returned by the user's ident server, or the one sent by the USER command

For a list of settings which are known to work with certain popular software, please see our Integrating m_sqlauth.so with other software page.

Modes
This module does not implement any extra user or channel modes.
Extended Bans (Extbans)
This module implements no extended bans.
Commands
This module adds no extra commands.
Special Notes
This module will check the user's nickname against the user field, and their password against the password field. The password is collected using the RFC 1459 notation, e.g.
PASS :password

The user will not be prompted for their password, if this is not clear enough to your users, you should place it into the kill message. It is highly recommended that if you are using a system such as this, you should disable nick changing once users are connected with the following syntax in your configuration file:

<disabled commands="NICK">

With such a setting in place, you can be sure that everyone who connects is registered, and they cannot possibly impersonate others. Beware of mixing this system with other systems which may force user nickchanges. If a users nick is changed when such a system is in place, they will be unable to change it back without reconnecting!

Extra ModuleThis module is an 'extra' module. This means that by default it is not compiled when you type make to build your IRCd. To enable this module follow these steps.
Dependencies
Personal tools
head
Navigation
head
head
head
head
 
head
head
Toolbox
head
head