Topic: Use punbb user records with pam
Yo!
I'm trying to figure out how to use the user information from punbb to give my users ftp access.
auth required pam_mysql.so user=vsftpd passwd=ftpdpass host=localhost db=vsftpd table=accounts usercolumn=username passwdcolumn=pass crypt=0
account required pam_mysql.so user=vsftpd passwd=ftpdpass host=localhost db=vsftpd table=accounts usercolumn=username passwdcolumn=pass crypt=0
The example pam configuration just fetches the user info from the database and uses plain passwords as configuration. You can also use shaX and md5 from the documentation I read so far.
The problem is that punbb stores salt in the user table, so for pam to be able to compare the passwords it needs to hash the user inputed password with the salt before comparing it to the password stored in the user table.
I wonder have anyone achieved to do this yet? Are there any other practical solutions for this? I could ofc write together a extension that stores an individual ftp password but it would really be sleak with the same password