Koozali.org: home of the SME Server

Website login using SME users

cydonia

Website login using SME users
« on: July 09, 2004, 05:54:23 PM »
I'm probably way off here, but, would it be possible to create a web portal that used users created in the Server manager.


So, you could login to a site using your sme un/pw, and based on who you were, and what groups you belonged to, you would be displayed different content.

Is this possible in a way where you only needed to add the users in the server manager?  rather than adding them using an additional web user registration/permissions form?

ergozd

Website login using SME users
« Reply #1 on: July 10, 2004, 06:49:58 PM »
May be you can try to handle that with LDAP so if you install a "portal" that allows LDAP login it should work.

You can modify your LDAP s ettings via Server Manager --> Directory

I had problems with LDAP a few times so be aware that it can be "tricky".

Good luck. Ergin

cydonia

Website login using SME users
« Reply #2 on: August 21, 2004, 09:34:08 AM »
I came across this script on Zend.com which i believe is what i was talking about:P:

===================================

<?

///////////////////////////////////////////////////////////////////////
// This code can only be used with these comments in the source code //
//         Originally written by Askama, master@xavamedia.nl         //
///////////////////////////////////////////////////////////////////////

if ($submit)
   
   {
   $ds = ldap_connect("LDAP Server");
   $attr = "password";

   if ($ds)
      {
      $r=ldap_bind($ds, "uid=$uid, ou=Department, o=Organisation", $passw);
     
      if ($r === -1)
         {
         echo "<BR>LDAP ERROR!<BR>";
         }
      elseif ($r == TRUE)
         {
         echo "<BR>You've been granted access to this system!!!<BR>";
         }
      elseif ($r == FALSE)
         {
         echo "<BR>Access Denied!!!<BR>";
         }
      else
         {
         echo "<BR>LDAP ERROR!<BR>";
         }

ldap_close($ds);

}
}

else
{

?>

<FORM action="thisdocument.php" method="post">
<INPUT type="text" name="uid">
<INPUT type="password" name="passw">
<INPUT type="submit" name="submit">
</FORM>

<?
}
?>


===================================

Original location for this script is:

http://www.zend.com/codex.php?id=284&single=1


I'm trying to get this script to do its job at the moment but my php skills are all but non-existent...

cydonia

Website login using SME users
« Reply #3 on: August 21, 2004, 10:23:09 AM »
I also found this:

It would need modding for SME server, but it is what i want to do:

http://www.metaconsultancy.com/whitepapers/ldap-linux.htm