Simplifying LDAP Logins
Articles and Tips: qna
01 May 2003
Q.
iChain is a winning tool for Novell and for my company. We use it to provide our users access to their GroupWise webmail, our Intranet and a number of other business systems. We've never installed a single product that has solved so many problems all at once. Dial-up is dead--long live iChain!
However, it comes with one big problem. As we were installing, configuring and testing it, the feedback we were getting was that typing your login in LDAP format was going to be just too hard. We needed the name to be fully qualified, but with all those ou='s and commas it is just way too difficult. Help!
Larry LDAPing with Logins
A.
Dear Larry: A Novell supporter, Rob Bennett has provided the following solution. If you have questions or kudos for Rob, you can email him at
rob_bennett@mcga.gov.uk
.
I wrote the following javascript which converts a user-supplied "traditional" username.context format login to the LDAP cn=username,ou=department,o=company format in the background. The "username" field which iChain reads is then set to hidden.
The code is activated by onChange="keypress()" in the login id field, which provides a rather nice side-benefit: the onChange action isn't triggered when the browser form-fills the fields for the user. Using, onChange, keeps the users from getting get the error "missing some fields" when the page loads. This solution has also helped us train our users to not leave their login credentials where others may find them!
<SCRIPT LANGUAGE = "JavaScript"> function keypress() { var loginstr=document.form1.loginid. value var loginarray=loginstr.split(".") newstring = new String("") for (var i=0; i < loginarray.length; i++) { if(i==0) {newstring += "cn=" + loginarray[i]} else { if(i==loginarray.length-1) {newstring += ",o=" + loginarray[i] } else {newstring += ",ou=" + loginarray[i] } } } document.form1.username.value = newstring } </SCRIPT>
This script assumes that you've dropped the Novell-supplied html files and have composed your own, but I'm sure there would be nothing to stop you putting this script into the standard one.
* Originally published in Novell AppNotes
Disclaimer
The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.