I want to enable users to use my rails application's credentials for login to sftp account. If I understand correctly I should somehow use PAM for this. But I didn't find any info on how to do this?
|
feedback
|
|
pam_exec can validate passwords using an external program. | |||||
feedback
|
|
You could write your own PAM module if you want. But the other solution is probably better. Check out a sample PAM module here: http://www.freebsd.org/doc/en/articles/pam/pam-sample-module.html | |||
|
feedback
|
|
If this rails info is in a mysql dbase you can configure pam_mysql. There are pam modules for just about everything. Here's one for ftp that I have with mysql:
You could also run a script that periodically dumps the username:passwords into a file and use the pam_pwdfile. There are a slew of choices. | |||
|
feedback
|