Hello, I am trying to write an PAM module for openssh, which should authenticate users using an MySQL database (it is based on pam_mysql). The problem is that I do not know what is necessary to authenticate successfully users, which do not have entries in /etc/passwd, for them I get invalid user :(. I will greatly appreciate any info on the matter. I have been pulling my hair out for almost two days on this, searched google numerous times, but without any success. I also tried to read the source code, but apparently I am not good enough to comprehend it. Thank you. Venelin Mihaylov
On Fri, Dec 24, 2004 at 06:58:30PM +0200, Venelin Mihaylov wrote:> Hello, > I am trying to write an PAM module for openssh, which should > authenticate users using an MySQL database (it is based on > pam_mysql). > The problem is that I do not know what is necessary to authenticate > successfully users, which do not have entries in /etc/passwd, for > them I get invalid user :(.I think you need to make an NSS module as well, which will make getpwnam() and friends work properly with your user database. Check out nsswitch.conf(5) on Linux or Solaris for more info. //Peter