|
From: Don H. <dha...@br...> - 2004-11-14 18:18:50
|
Hi I have not been able to log on to rolodap. I tried the suggestion to
remove the @ in auth.phtml but still can't log on. The page appears to
be correct up to password. The rest seems to be wrong. This is on fedora
2 and the same on 3.
Thanks Don
This is the text appearing.
"; } ?>
"; $userinfo["rolodappersonalbook"][0] = $modify_info
["rolodappersonalbook"][0]; // now we need to create the group in
rolodap $add_info["cn"][0] = $username." Personal Book"; $add_info
["description"][0] = "$username's personal rolodap book"; //$add_info
["objectclass"][0] = "groupofuniquenames"; $add_info["objectclass"][1] =
"rolodapBook"; $add_info["objectclass"][2] = "top"; //$add_info["ou"] =
$GROUP_OU; $add_info["rolodapbookpersonal"] = "yes"; $addresult =
ldapadd ($LDAPSERVER_IP, $modify_info["rolodappersonalbook"][0],
$BIND_AS, $BIND_PASSWORD, $add_info); //echo "addresult : $addresult
"; } else { // we just want to check and make sure that the group in the
user's record actually exists in the ROLODAP directory as well
$personalbookcn = split (",",$userinfo
["rolodappersonalbook"][0]); //echo "personalbookcn ".$personalbookcn
[0]."
"; $filter = sprintf("(&(%s)(objectclass=rolodapbook))",$personalbookcn
[0]); //echo "filter : $filter
"; $personalbook = ldapsearch($LDAPSERVER_IP, $LDAPSERVER_BASE_DN,
$filter,$BIND_AS,$BIND_PASSWORD); //echo "personalbook 0 cn:
".$personalbook[0]["cn"][0]."
"; if ($personalbook["count"] < 1) { // their personalbook doesn't exist
so we need to create it. echo "Found personal book entry in user's
record but the book doesn't exist, creating one now
"; $add_info["cn"][0] = $username." Personal Book"; $add_info
["description"][0] = "$username's personal rolodap book"; //$add_info
["objectclass"][0] = "groupofuniquenames"; $add_info["objectclass"][0] =
"rolodapBook"; $add_info["objectclass"][1] = "top"; //$add_info["ou"] =
"groups"; $add_info["rolodapbookpersonal"][0] = "yes"; $add_info
["createdby"][0] = "$username"; $add_info["createdon"][0] = date
("Ymdhi")."Z"; $add_info["modifiedby"][0] = "$username"; $add_info
["modifiedon"][0] = date("Ymdhi")."Z";; $dn = $userinfo
["rolodappersonalbook"][0]; $addresult = ldapadd ($LDAPSERVER_IP, $dn,
$BIND_AS, $BIND_PASSWORD, $add_info); } } // going to pre-read the books
in the user's group list so as to save load time later when going to any
of the search pages. $usergroups = listgroups($LDAPSERVER_IP,
$LDAPSERVER_BASE_DN, $BIND_AS, $BIND_PASSWORD,$userinfo["rolodapbook"]);
$firmbookrecord = ldapsearch ($LDAPSERVER_IP, $firmbookdn,
"(objectclass=*)", $BIND_AS, $BIND_PASSWORD); $firmbooks = listgroups
($LDAPSERVER_IP, $LDAPSERVER_BASE_DN, $BIND_AS, $BIND_PASSWORD,
$firmbookrecord[0]["uniquemember"]); session_register("username");
session_register("password"); session_register("basedn");
session_register("userinfo"); session_register("usergroups");
session_register("firmbooks"); // re-read config file here because of
the chance that the config is set to bind to the auth server as self. //
if this is true we need the user's username and password in the
readconfig. //jsErrorBox ("reading config again with $username");
readconfig ($CONFIGFILENAME,$userinfo["dn"],$password); //echo "admin?
".$userinfo["rolodapadmin"][0]."
\n"; // this is only hear to avoid breaking some old code. if
(strtolower($userinfo["rolodapadmin"][0]) == "yes") { // checking to see
if the user is an administrator or not $admin = "yes"; session_register
("admin"); //echo "ok making you an admin
\n"; } setuserprefs($userinfo); echo ""; } else { // we couldn't bind
using the supplied name and password $auth_dn=""; $auth_passwd="";
$username=""; $password=""; echo" "; } // for if($ldapBind) } else { //
we couldn't find the ldap server require("support/server-
error.phtml"); } // for if($ldapServer) } else { // user is logging in
anonymously // setup anonymous userinfo array $userinfo["cn"][0] =
"Anonymous"; $userinfo["sn"][0] = "Anonymous"; $userinfo["givenname"][0]
= "Anonymous"; session_register("anonymous"); session_register
("username"); // session_register("password"); session_register
("basedn"); session_register("userinfo"); echo ""; } // end if (!
$username) ?>
|