Getting PAM/user info into php - something like Net_Finger instead of a db?

Posted by digitaltoast on Server Fault See other posts from Server Fault or by digitaltoast
Published on 2014-05-27T14:46:57Z Indexed on 2014/05/27 15:29 UTC
Read the original article Hit count: 198

Filed under:
|
|
|

I've got a very small user group who just need to login, upload, check and then move specific files to a different area when ready.

Right now, I use the nginx PAM auth module to log them in against their unix accounts.

As their login is their home directory, I've already got the info to send the uploads to the right area - one line of php and no database needed.

But I'm maintaining a separate DB just so PHP can welcome them, grab their email and send them an email when processed.

Yes, sure I could use nosql or sqlite instead so as to not need a whole mysql install.

But it occurred to me that as I've got all these blank user fields for phone numbers I could populate with any data, that I could use something like php's Net_Finger. Which failed for me with:

sudo pear install Net_Finger
Starting to download Net_Finger-1.0.1.tgz (1,618 bytes)
....done: 1,618 bytes
could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-download/Net_Finger-1.0.1.tgz"
Download of "pear/Net_Finger" succeeded, but it is not a valid package archive
Error: cannot download "pear/Net_Finger"

At which point I thought I'd stop, and take a ServerFault reality check - is this a really bad/dangerous/stupid idea just to stop me having to maintain details in two places rather than one? It there a better way? Googling shows that it's not an oft-asked thing, so perhaps with good reason?

© Server Fault or respective owner

Related posts about linux

Related posts about php