I would find it useful to be able to include the source hostname as part of the mysql queries.
This would be useful in an environment where a number of hosts are authenticating against one central database, where users may or may not have accounts on a given host, but where they should have the same information across all hosts.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I would find it useful to be able to include the source hostname as part of the mysql queries.
This would be useful in an environment where a number of hosts are authenticating against one central database, where users may or may not have accounts on a given host, but where they should have the same information across all hosts.
Isn't it just possible to change the queries in the configfiles? Or are these also shared?
Right. Unless you _need_ to have the same config on every machine, your /etc/libnss-mysql.cfg could contain a MySQL query along the lines of:
getpwnam SELECT username,'x',uid,gid,gecos,homedir,shell FROM users WHERE username='%s' AND hostname='insert-your-hostname-here' LIMIT 1
You'd need to modify all your queries similarly.
Excuse me while I beat myself for that one. :) Even if I wanted to autogenerate the configs, it's easy enough to include a static hostname in there.