LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-22-2005, 04:05 AM   #1
prabhatsoni
Member
 
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Rep: Reputation: 30
Common authentication for various services


Hello everybody,

I have a intranet portal that gives all sorts of reports to my people. The setup is mysql+php+ apache. In this setup, I have created a mysql table for my users. In this table, I have everybody's uid,encrypted password, their privileges etc. When some fellow logins I take his password, and take out a md5 hash of it, and then compare the uid and this md5 hash with the ones saved in my table, and authenticate them. Once authenticated, I save the uid, and other tit bits of the user in PHP session variables, so that once autheticated the user can access all the allowed data on the site without logging in again.
So far so good.
Now I have started squirrelmail on my server. But here the users who can assess the server have to be created in the OS. So I have created all the users in my FC1. In my opinion creating users in OS is very crude,and probabely insafe.
Now It is very typical that my users have to seperately log in with altogether independent uids, and passwords for accessing the portal, and for accessing the squirrelmail server. This is indeed highly undesirable- once a user logs in he should be able to what ever he desires, without logging out and logging in with different uid and password. I believe there is a way by which the authentication can be centralised.

Any help !

Thanks in advance.

Prabhat Soni
 
Old 06-22-2005, 04:30 AM   #2
stefan_nicolau
Member
 
Registered: Jun 2005
Location: Canada
Distribution: Debian Etch/Sid, Ubuntu
Posts: 529

Rep: Reputation: 32
I can use squirrelmail without creating the users...
 
Old 06-22-2005, 07:51 AM   #3
prabhatsoni
Member
 
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Original Poster
Rep: Reputation: 30
But Sir, how can you do it ?
Please enlighten me. How do you authenticate you users ?

Further, I feel we have to look at the larger picture- this squirrel mail is but one of the examples. How do we go about authenticating users once and then allow him roam as per his class of service.



Prabhat Soni
 
Old 06-22-2005, 09:30 AM   #4
stefan_nicolau
Member
 
Registered: Jun 2005
Location: Canada
Distribution: Debian Etch/Sid, Ubuntu
Posts: 529

Rep: Reputation: 32
Authentication is simple: Squirrelmail gets the user's credentials with a form, and uses them to connect to the imap server, which is in charge of the authentication.

I'm not sure how to do 'roaming': Squirrelmail would need to use http authentication instead of its form, your web site would need to use http authentication too, (maybe mod_auth_mysql, or write your own implementation). All the scripts and parts of the web site have to be set to use the same http authentication relam, and the user will only type his password once.
 
Old 06-25-2005, 05:21 AM   #5
prabhatsoni
Member
 
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Original Poster
Rep: Reputation: 30
Dear Sir Stephan,
What you say makes sense.
But inspite of my best efforts in digging I am unable to find as to how I can change the way the imap does the authrtication. Giving up, I decided upon using LDAP for authentication. For this I downloaded openldap, and tried to install it. It said there is Berkley DB version incompatibility. Then I did some research, I found out that I needed DBversion 4.2. I downloaded the same from sleepycats... Then I gave up becasue I felt it was a wild ghoose chase.

I decided to attack the original track - the imap doing authentication. I feel, that I can make imap use my authentication. For that I need to know how I imap is doing authentication.

Any pointers ( or references) :-)

Prabhat Soni
 
Old 06-25-2005, 05:56 AM   #6
stefan_nicolau
Member
 
Registered: Jun 2005
Location: Canada
Distribution: Debian Etch/Sid, Ubuntu
Posts: 529

Rep: Reputation: 32
It depends on your server, but it probably uses pam
http://www.kernel.org/pub/linux/libs...-html/pam.html
try looking at
http://pam-mysql.sourceforge.net
(sourceforge was down this morning, I don't know if the link works now)

I use the dovecot server, but any pam-compatible server (most servers are) is fine.
 
Old 06-25-2005, 06:35 AM   #7
prabhatsoni
Member
 
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Original Poster
Rep: Reputation: 30
By chance, I too have discovered that imap uses pam, and there is a file by the name of imap in th directory /etc/pam.d.

Thanks a lot.

Your pointer towards pam-mysql though is not known to me - I will explore it.
Thanks again.
Will come back to pester you, if my problem is alive.


Prabhat Soni
 
Old 06-30-2005, 01:38 AM   #8
prabhatsoni
Member
 
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Original Poster
Rep: Reputation: 30
Hello

For time being I am resigned to having seperate authentication.

Sooner or later I will switch over to ldap.


Prabhat Soni
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BOGUS.common.04y -> /home/common/Mailbox jayakrishnan Linux - Networking 0 11-19-2005 04:48 AM
Common authentication on *nix docrice Linux - Enterprise 3 07-18-2005 09:43 PM
linux nt domain common authentication masoooom Linux - Networking 0 08-25-2003 09:24 AM
Postfix, Active Directory Services and Authentication weazy Linux - Software 1 04-28-2003 03:38 PM
Common services Proud Linux - Software 7 04-27-2003 10:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration