Scripted auth in preview
| Topics: | dev, hacks, tech |
|---|---|
| Tags: | |
| Share: |
Hey Kids,
How are things? so I’ve made some progress in my attempt to code myself out of a job. Just checked the scripted auth into the preview branch which should be released in a few days. It’s very basic right now with more improvements to come. At the moment userLogin, getUserType and getUserInfo are the only methods you need to fill in.
I’ve written up a sample that interfaces with PAM on the linux, using /etc/passwd to get user lists. Mac users skip the pamauth.c compile you don’t need this app and pam don’t like macs ( can’t say I blame pam on that score)
First off a pamauth.c program to compile that will talk to pam for ya. Donated by Phillppe Troin, thank you fif. Feel free to take and edit for your own purposes, but you must send fif a chocolate chip cookie if you found it useful.
File pamauth.c is attach due to severe lameness on part of wordpress, insisting on screwing with the #include’s
Compile that puppy like so
gcc -Wall -Wextra -o pamauth pamauth.c -lpam
You may need to create an entry for pam
edit /etc/pam.d/pamauth and put this line in
auth sufficient pam_unix.so
