Run the configure script.

Here is the with args that configure understand.

--enable-default_home=DIR :
This means that you have no column to store the home directory of your
users. DIR will be the root of your home directory structure (eg. /home ).
The default is --disable-default_home.
Anyway, this value can be overriden in nss-mysql.conf

--enable-shadow :
This allows you to simulate the libshadow behaviour. For more details,
see the SHADOW file.
The default is --enable-shadow.

--enable-group :
It adds the group support. You'll need a group table which has the
groups' details and a table that joins (as in SQL JOIN) users and groups.
The default is --enable-group.

--enable-debug :
This sends debug messages to the auth log. Use it only for debugging purposes,
since compiling the software with it will slow it down significantly.
The default is --disable-debug

--enable-default_gid=GID :
This makes all your users be members of the group represented by the GID given
as argument. You will not need a column for the users' gid in you MySQL table.
The value for the GID can be overridden in nss-mysql.conf
The default is --disable-default_gid. (Which means you need to have a gid column.)

Once you've done that, type 'make'.
Hopefully it builds... If not, drop us a message.
Then run 'make install'.
Edit the configuration files /etc/nss-mysql.conf and /etc/nss-mysql-root.conf.

If you don't understand the configuration files options, take a look at the
sample.sql file which contains a sample table structure.

To remove the libraries and configuration files, you can also 'make uninstall'.
(This will NOT remove your configuration files)

nss-mysql-root.conf is only needed if you've enabled shadow support. This file
MUST BE only root readable.

Edit your /etc/nsswitch.conf. For example;

passwd:		files mysql
shadow:		files mysql (only if you have enabled the shadow support)
group:		files mysql (only if you have enabled the group support)

For this release that is definitely the recommended order! IE, the libraries
will search the normal /etc/passwd and /etc/shadow files for users, and if
they're not found there then they'll ask MySQL.

Save the file and try it, good luck :-)

For questions, feedback, patches use our SourceForge page :
http://sourceforge.net/projects/nss-mysql/

