user-account

Test local user login data

I'm currently in the process of writing a CGI blog engine in C (fun project - don't hate! :) and I'd like to enable posting for every user that has a login on the machine the webserver is running on. What is the correct way to see if a supplied login and password match against the systems login data? Just to clarify, if I have a shell ...