1. Setup iPrint printers in a specific OU structure
This might be one of the more difficult parts for some individuals, since
it might involve changing your NDS tree around from it's current structure.
However, if you are just starting out with iPrint, or you only have a few
printers already created then it will be easy to just move things into place.
We started out with iPrint printers all over the tree, and found that moving
them into this 3 tier structure was not that hard, and the end results were
more organized and easier to manage. The important part is to understand that
the OU structure has to be limited to a 3 tier level. Something like this
| Organization (o) |
| .....iPrint (ou) |
| ..........Building (ou) |
| ...............Location (ou) |
| ....................iPrint printers (cn) |
| ....................iPrint printers (cn) |
| ....................iPrint printers (cn) |
| ....................etc. |
| ..........Building2 (ou) |
| ...............Location (ou) |
| ....................iPrint printers (cn) |
| ....................iPrint printers (cn) |
| ....................iPrint printers (cn) |
| ....................etc. |
| ...............Location2 (ou) |
| ....................iPrint printers (cn) |
| ....................iPrint printers (cn) |
| ....................iPrint printers (cn) |
| ....................etc. |
....or here's an actuall print screen of our NDS tree:
As you can see, it's makes sense. You start with the iPrint OU (our basedn) and
put the "iPrint_Admin" user object with read rights in the root of this OU, then
from there you create a "Building" OU, within that a "Floor" OU and then a
"Location" OU. For multiple buildings, floors or locations, just repeat the
process, keeping in mind that the limit is 3 teir. Meaning, don't create another
OU within the "Location" OU. If the building doesn't have multiple floors or
locations, then that is fine. You can place the printers anywhere within the
Building OU, and the script will list them out. Don't worry, it will all make
sense once you see it running.
|
2. The PHP script
Well, since it would look to cluttered for me to cut and paste the actual script
in this page, I'll just give you a link to download the script and other stuff:
Download it from here
When extracted, you should have an iPrint folder, within that folder is an index.php
file. Open that up in a text editor (or whatever) and change some of the variables
at the top to reflect your LDAP information:
$host="ldapserver.company.com"; //change this to your ldap server
$basedn = "ou=iPrint,o=organization"; //change this to your basedn
$auth_user="cn=iPrint_Admin,ou=iPrint,o=organization"; //change this to your ldap user
$auth_password="i.love.OpenSource"; //change this to your ldap user's password
|
Once you have the structure from step 1. created, and then change the information
from above, you should be able to put that iPrint folder in a web directory and launch it.
Some of you might be able to tell, I simply grabbed some of the graphics that came with
the iPrint setup, and made this look very similar to a standard Novell web application. Here
is a print screen with the page in action.
That page listed a little over 50 printers, and it did that in about 1 second!!! No, I'm not
kidding....that's how fast Novell LDAP is....not bad...huh? In fact, when I started all of this, to test
out the speed of LDAP, I wrote up a little Perl script that would generate LDAP objects with the
proper attributes. Well, unfrotunately, I missed one little mundane detail...I put in an extra zero
and accidently created 5,000 printer objects instead of 500. :-) It was still extremely quick, listing
out all the printers in a matter of seconds!
Each printer that is clickable (in blue), will bring you to one of two things:
If you do not have that specific printer installed then it will install the printer via iPrint
just as it would if you had clicked on it from the map page.
If you already have that printer installed, then you will just go to that printer's iPrint web
page.
The PHP script parses through each LDAP object looking for a specific attribute: ndpsprinterxri.
Once it finds that, with a little PHP code, it turns it into a URL. If you know how to write PHP code,
look over the script, and I'm sure you'll see how easy it is and you might even see some improvements
for your specific environment. In fact, I plan on adding this to Novell Forge for an open source project,
that way others out there could improve this method.
We use ZEN Works to distribute out the iPrint client, and then just launch a web browser with the
iPrint web page as a command line parameter. The users are presented with the above menu system,
and after a couple of choices, they are presented with their available printers.
|