26 January 2007

In the Direction of NWDir

At work, I frequently need to find out whether Netware accounts exist for a given list of employees. The task can be accomplished with Bindview but I don't like that route for many reasons. Bindview's interface is very clunky and unintuitive. The export routines are still in the stone age of computing and can only save files in DOS' 8.3 format, i.e. eight characters for the name and a 3-character extension, such as RBusr107.csv (Retail Bank users for January 2007, in a comma-separated value text file.) What's more, with Bindview I need to login with a username and password, and because I don't use it often enough, I usually have trouble remembering it. The company doesn't have enough licenses to cover all the users in the Netware Directory Service, so to get a list of everyone in the tree means running multiple reports, on the different regions, and combine them afterward. I never figured out how to use Bindview's filter function to limit the resulting report to show just the users I am interested in. Lastly, it is a waste of time to have to make a list of everyone in the network and then go through that to find the ones I am interested in. The perfect approach would be some kind of codes that take from me a list and search just for them.

With ActiveDirectory or NT, I have found the necessary codes to look up the network accounts. GetObject(), whether bound to NT or LDAP provider, provides what I need. With Netware, there are very few code examples out there to learn from. I know it can be done because someone in the London office wrote a program, Novell Utilities, to add users to groups, all from just the username. I asked for the code of Novell Utilities, but the original programmer had moved on to some other position within the firm and his replacement could only send me the codes without any help. He sent me some VB project file that even after I gave myself VB6 I still couldn't read it. The replacement guy was so busy with whatever he had to do, I couldn't expect any help from him. Or at least that's what he said. So I forged on on my own, relying only on the search power of Google to find some code examples on NDS programming. Novell provides some reference materials, but without formal basic training and examples, they were totally useless. It didn't help that the company blocked access to Usenet groups. Usenet groups are the digital equivalent of public bulletin boards where people can post and read notices. There are all kinds of topics in Usenet and while many are technical-based, there are also many about dating, hobbies, politics, etc. topics that are best not be made readily available to the office workers to keep them unproductive.

I wrongly assumed that since Novell eDirectory is some kind of LDAP, I would find what I need by searching for Netware and LDAP, even GetObject and NDS. Finally, it dawned on me that since Novell Utilities requires some .ocx and .dll files to be registered, I should try to search for anything related to the names of the support files, namely NWDir. But it was only at home, on the Mac, that I managed to find references to NWDir in some Usenet messages. One big challenge with NDS is that to reference a user I would need to know the full path to where in the network the user is. For example, just SmithJ isn't enough, I have to specify John Smith's account as SmithJ.Accounting.NYC.Amer.Hercules, to properly identify the SmithJ account in the Accounting department of the New York office of the Hercules tree. With NWDir properly used, I can get the fullname from just the username and from then get all kinds of info about the user. I've cobbled together some codes and so far have not succeeded but I'll keep trying because I know NWDir is the right direction to take.

No comments:

Post a Comment