System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Linking unix users and php users

 
Valued Contributor

Linking unix users and php users

Hi masters,

I got php script where can create users and give password and allow them to acess files(through web).

Here I use .htusers.php file for user authorization,
I want to link unix local user to this users(which are under ./htusers.php)so that i will not face any permission issue.

Chandra
4 REPLIES 4
Honored Contributor

Re: Linking unix users and php users

What you are looking for is not directly a function hpux or any other operating system provides. It is the authentication module of your web server software. Since you are referencing php and .htaccess, I am under the impression that you are using apache as your web server. If this is correct, there are many different ways you can accomplish this. Unfortunately, I do not know any one of them from a close encounter. But if you click on the following link, it will take you to the google search page, where you can browse solutions and decide which one most closely resembles your setup.

http://www.google.com/search?q=apache+php+use+passwd+authentication

hope this helps
________________________________
UNIX because I majored in cryptology...
Valued Contributor

Re: Linking unix users and php users

Thanks for reply,

Its apache web server.


Chadra
Honored Contributor

Re: Linking unix users and php users

Hi Chandra,

there are several authentication schemes and modules available for Apache.
One that seems viable to me would be to authenicate your web users against an LDAP directory to which end there exists mod_auth_ldap
http://httpd.apache.org/docs/2.0/mod/mod_auth_ldap.html

Of course, the easiest and probably most common form for websites with a moderate user base would be to simply use mod_auth with AuthType Basic against an AuthUserFile.
http://httpd.apache.org/docs/2.0/mod/mod_auth.html
But then you would have to keep this file somehow in sync with your system's passwd and group files.
Madness, thy name is system administration
Valued Contributor

Re: Linking unix users and php users

"But then you would have to keep this file somehow in sync with your system's passwd and group files."

This is where i am looking for,

if i create user using httpasswd how unix file permission will be maintained??

Chandra