Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Maybe. But we can't tell without seeing your current configuration. –  Ignacio Vazquez-Abrams Apr 14 '11 at 16:31

1 Answer 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.

share|improve this answer
    
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 9:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.