I installed libnss-mysql-1.3 from the FreeBSD-5.4-release ports tree, and did the config part. I already had a sql-db from an older linux-libnss-installation. After adding pwchange/class to the table, it worked on this machine.
But now this box decribed above is the server to twenty diskless clients, which all borrow his / and his /usr, and have some configs of their own in /etc.
On this boxes, I can `finger <user>` ok, but I can't login with this names. The logfile tells me:
(debug.log)
<time> <servicename> NSSWITCH(nss_method_lookup): mysql, passwd, endpwent, not found
where servicename is `login` and `cron`.
The same message appeares in the servers debug.log, but only from cron and sm-msp-queue
Help need
So long
Andy
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Quick answer: you need to add MySQL lib dir to your library search path FAR before the startup file in /usr/local/etc/rc.d/000.mysql-client.sh does. To do so, edit /etc/rc.conf and add a line like the following:
And reboot the machine (or restart crond, sshd, and any other affected daemons, but a reboot is cleanest and tests to make sure my fix works).
I'll make a note about this in the documentation.
As for your config file - the provided config has *all* the queries you'd ever need. "endpwent" and "getpwnam_r" aren't valid configuration directives.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, that seems to work except for cron, he still brings up this messages... but much more important for me, is the following:
I have a diskless client running from the server mentioned above, having his shared / and /usr. I can look up users via id, this works without problems, but I cannot login with them (I can, however, locally on the server). No messages in syslog...
Do you have an idea to that too?
Thank you very much for your support
Andy
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
FreeBSD-style, the configs are in /usr/local/etc which is mounted with /usr as read only. I'll have a close look at permissions and will mail you the strace output as soon as possible...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Greetings,
I installed libnss-mysql-1.3 from the FreeBSD-5.4-release ports tree, and did the config part. I already had a sql-db from an older linux-libnss-installation. After adding pwchange/class to the table, it worked on this machine.
But now this box decribed above is the server to twenty diskless clients, which all borrow his / and his /usr, and have some configs of their own in /etc.
On this boxes, I can `finger <user>` ok, but I can't login with this names. The logfile tells me:
(debug.log)
<time> <servicename> NSSWITCH(nss_method_lookup): mysql, passwd, endpwent, not found
where servicename is `login` and `cron`.
The same message appeares in the servers debug.log, but only from cron and sm-msp-queue
Help need
So long
Andy
I guess that behaviour isn't that strange.
Could it be the problem that endpwent, getpwnam_r aren't defined in either libnss-mysql.cfg nor libnss-mysql-root.cfg?
How should a definition look like? It seems to work for login, but it does not for sshd and cron yet.
Andy
Quick answer: you need to add MySQL lib dir to your library search path FAR before the startup file in /usr/local/etc/rc.d/000.mysql-client.sh does. To do so, edit /etc/rc.conf and add a line like the following:
ldconfig_paths="/usr/lib/compat /usr/X11R6/lib /usr/local/lib /usr/local/lib/mysql"
And reboot the machine (or restart crond, sshd, and any other affected daemons, but a reboot is cleanest and tests to make sure my fix works).
I'll make a note about this in the documentation.
As for your config file - the provided config has *all* the queries you'd ever need. "endpwent" and "getpwnam_r" aren't valid configuration directives.
This advice works for me on FreeBSD 5.4 and 6.1, thanks!
Can root read /etc/libnss-mysql-root.cfg? I'm wondering if there's a root-NFS issue here.
If so, I'll need the output of the strace command (see the DEBUGGING document) emailed to me (as an attachment in order to preserve formatting).
Ok, that seems to work except for cron, he still brings up this messages... but much more important for me, is the following:
I have a diskless client running from the server mentioned above, having his shared / and /usr. I can look up users via id, this works without problems, but I cannot login with them (I can, however, locally on the server). No messages in syslog...
Do you have an idea to that too?
Thank you very much for your support
Andy
Are you using 'sudo' to restart cron? As soon as I restarted it, that fixed it for me so I'm puzzled why it's not working for you.
What's your 'server' specification in your /etc/libnss-mysql.cfg?
not, which might be obvious, localhost but the hostname, brainbug (which is mapped to an ip in the clients /etc/hosts)
I'll have a closer look at the cron thing tomorrow, but the client-problem is much more important to me atm
FreeBSD-style, the configs are in /usr/local/etc which is mounted with /usr as read only. I'll have a close look at permissions and will mail you the strace output as soon as possible...