Ubuntu 12.04 VPS doesn't boot with mysql in nsswitch.conf

Posted by chrisv on Server Fault See other posts from Server Fault or by chrisv
Published on 2013-05-10T19:54:13Z Indexed on 2014/06/06 9:28 UTC
Read the original article Hit count: 411

Filed under:
|
|

1and1 VPS ("dynamic cloud server") does not boot any more as soon as mysql lookup is enabled in nsswitch.conf - any suggestions appreciated.

Minimal setup to reproduce the problem:

  • install Ubuntu 12.04 / LTS minimal server image
  • install mysql-server, libnss-mysql-bg, nscd
  • configure /etc/libnss-mysql.cfg and /etc/libnss-mysql-root.cfg
  • set up appropriate database tables
  • configure nss lookups through mysql in nsswitch.conf

    passwd:         compat mysql
    group:          compat mysql 
    shadow:         compat mysql 
    

Now, when I try to reboot the server it just hangs. No logs (maybe due to /var not yet being mounted), and I can't see console output (since this is a VPS). Booting into recovery image and removing "mysql" from /etc/nsswitch.conf makes the system bootable again, so this is definitely related to nsswitch/libnss-mysql-bg.

There's a thread on gentoo-users which seems to describe a similar problem, unfortunately there's no real solution described, also the thread is rather old (from 2006) so I'm not sure whether this applies to me at all.

© Server Fault or respective owner

Related posts about mysql

Related posts about ubuntu-12.04