2

I'm trying to setup libnss-mysql and libpam-mysql. So far everything has been working. I can use id to get information about the users stored in my databas. getent passwd is working, as well. However, getent shadow is not. Additionally, I'm not able to change the passwords of users that are stored in the database using passwd. Is there a way to fix these issues?

Btw., I'm running Ubuntu 10.04 as a Minimal Virtual Machine.

Update

The only configuration files I change were /etc/nss-mysql.conf, /etc/nss-mysql-root.conf and /etc/nsswitch.conf. I'm pretty sure the former two are correct. Since they simply configure how the database is accessed. I only added the word "mysql" to the following three lines of the latter one:

passwd: compat mysql
groups: compat mysql
shadow: compat mysql

I didn't touch any other configuration file. If one of you needs to see any other file, please let me know, because right now I have no idea which other configuration file might be of interest.

t6d
  • 507
  • 2
  • 5
  • 12

1 Answers1

1

Normally, getent shadow won't return anything unless you are root.

You need to change the PAM config in /etc/pam.d to use the mysql PAM module.

After that you will be able to change passwords with the normal passwd command.

Mark Wagner
  • 17,764
  • 2
  • 30
  • 47
  • I was `root` when I executed `getent shadow`. It returned all the users specified in `/etc/passwd`, however, not the ones stored in the database. Are there any resources on how I properly configure `pam` to work with MySQL? – t6d Apr 15 '11 at 09:54