mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-22 19:44:21 +01:00
30 lines
977 B
Text
30 lines
977 B
Text
On to the good stuff :-)
|
|
|
|
To get this working (locally) login to the database server, presuming that
|
|
it is running; otherwise read /etc/rc.d/rc.mysqld first; to make the DB:
|
|
|
|
# mysql -uroot -p
|
|
> CREATE DATABASE nss_mysql;
|
|
|
|
After this is done it has to be populated with the user tables; there is
|
|
an example for them provided in /usr/doc/nss-mysql-1.0/sample.sql
|
|
|
|
You can copy that to say /tmp, (probably) edit it some, and insert it with:
|
|
|
|
# mysql -uroot -p -D nss_mysql < /tmp/sample.sql
|
|
|
|
After this is done create the 'nss' and 'nss-shadow' database users with
|
|
statements such as the ones found in /usr/doc/nss-mysql-1.0/SHADOW
|
|
And make sure the passwords for them in /etc/nss-{mysql,mysql-root}.conf
|
|
match up...
|
|
|
|
Now edit your /etc/nsswitch.conf to look like the -mysql version and try
|
|
the following commands:
|
|
|
|
getent passwd
|
|
getent shadow
|
|
|
|
Which should list the users pulled from mysql!
|
|
(Otherwise have a look at 'tail /var/log/syslog' for hints on how to fix it).
|
|
|
|
-Menno.
|