Forum Moderators: travelin cat

Message Too Old, No Replies

OS X web-based login?

         

lZakl

12:32 am on Jun 3, 2005 (gmt 0)

10+ Year Member



I have kind-of a complicated question: Is there a way to pass login information to OS X Server through a PHP form?

Some background:

Say I have 3 employees set up on the server as users. Their login works for any service that OS X server offers. Even the web server. I can protect directories on the web, simply by allowing user 1 but not allowing users 2 and 3.

My problem? I want them to all be able to access X directory, which of course I can do. But once they are in, I have no way to keep track of them. In a form to add data into a MySQL database, I have a part that says "please enter your employee number". Well I can't check that against anything, since they are all allowed to this directory. So user 1 could enter users 3's employee number and delete some of number 3's data.

I am probably making this harder than it need's be. If I could pass login information from a web-form to OS X Server via PHP (or PERL for that matter), the rest is cake.

Can you login using a ssh tunnel, or any other method, with PHP or PERL? I am exhausted with researching this, and would love some input!

Thanks in advance!

-- Zak

whoisgregg

11:25 am on Jun 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've never tried this, but what happens if you echo $_SERVER['PHP_AUTH_USER'] on your password protected page? It's supposed to show the current logged in user... If it does then I'd say the rest from there is easy.

lZakl

3:32 pm on Jun 3, 2005 (gmt 0)

10+ Year Member



whoisgregg,

Thanks for the reply. I had no luck using echo $_SERVER['PHP_AUTH_USER']. It just returned nothing. This tells me that the authentication that X Server uses for the web is not HTTP based. "Where there is a will there is a way" ... Does this mean that beacause I have a will to get it done that it is possible? *hoping*

I'll keep researching. Please let me know if you have any more ideas!

-- Zak