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