perl script??

0
No votes yet

Hello all,
I would appreciate any kind of input from here. I have this huge project in front of me which is to populate the Luminis portal with our users on campus. I have an ldiff file which has all the records and i have the luminis portal which expects all the users to be in xml format.

My problem is that i am new to both unix network and luminis. Its my second week of acquantance and i have to get this project up and running by the end of march. For that i need to finish the uploading of users to the luminis portal within 2 weeks. I was told by the system admnistrators that they would prefer me to use perl.

I am open to learning new languages and i am in the process of learning it, but i would appreciate if anyone has done this kind of thing before and could share with me their experiences, their resources and where could i get a good headstart for this project.

I need help with my perl script and i would love to share my code at this point, if you guys are willing to correct me or tell me how/where should i be looking to get a solution for this problem,

Thanks,
ask0500

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Perl Script

I've written lots of perl script to interface with both LDAP and XML. I use Net::LDAP to read and write LDAP directories and XML::LibXML and XML::LibXSLT to read, write, and transform XML. There are lots of other perl XML libraries but these are the ones I'm familiar with.
I'd be glad to review your code and give you some pointers.

thanks for your help lieb

I am totally new to this area so the terms that you are using sound a bit scary, but i will get over it pretty soon. But i really appreciate your willingness to help though.

At this point, i dont have a whole lot of code, i am just in the process of trial and error - trying to learn perl and work things out slowly. It would really help me if you know of any resources where i can get some perl scripts which accomplish things that i want to do.

Thank you,
Shiva

Read up on the ldapmodify command

Here's a command that'll import some stuff into ldap for you but I highly recommend you read up on the ldapmodify, ldapdelete, and ldpasearch commands. You will find them very useful.....kranky and klunky but useful.

/opt/luminis/products/ds/shared/bin/ldapmodify -c -a -v -D"cn=Directory Manager" -w
-f .ldif

I am not by any means an expert on ldapmodify but I have seen its usefulness. I have used it to put entries in users' address books so that certain users can all have a similar set of address lists etc. The command above is the one that the SCT technician used to import information into ldap for us. Like I said...read up on it. This may not be much help but it'll point you in the right direction. I will tell you this though....if you can get that same information in XML format it's easy as falling off a rock to get the data in luminis. cptool import file -a for append or -r for replace. We usually use the -a switch.

Lyle

Perl scripting - Net::LDAP/XML::Lib??? etc ...

I'd be interested in seeing some of your coding. I am new at florida atlantic university and will be involved in the scripting of various aspects of luminis. I am interested in utilizing perl for this and am interested in seeing what libraries/modules are being utilized and how perl is currently being used by other universities. Any input that you can offer this newbie to luminis would be greatly appreciated!

Thank you!
- Lisa

e-mail me

Send me your e-mail address. I have a PERL script that I think will help you out. chergett@atu.edu

thank you for your help

Here is my email address:
personal" ask0500@gmail.com
school: shiva.ayalasomayajula@sandiego.edu ( you might make a typo trying to type that long name but if you prefer to email it to a professional email, i understand)

Thank you,
shiva

Also jason raised some interesting questions:

Is your school using SCT Banner?
If you use banner, there are built in ways to export all users to an xml file.

>> Our school is just now trying to implement Banner. For now, we have htmldb based application called WebReg and couple of other applications.

Since you have an ldif file, I'm assuming that all your users are in an ldap of sorts already. Have you considered just making luminis authenticate against your current ldap?

>>At this point we have EAS setup. But it is my understanding (or atleast thats what i have been told) that eventhough luminis checks for authentication through ldap, it still needs user accounts in its db to compare the usernames. I am not so sure about the technical teminology used for this process ( i guess authentication and authorisation). But please feel free to correct me if i am wrong.

In regards to the luminis user info that would reside in the luminis ldap, how do you intend to import new users on an ongoing basis (if not using Banner?)?

>> That is something that i haven't thought of at this point. My first idea is to check the ldiff files for the differences and update the luminis db with just those differences. I dont have a script for it right now, but i guess iwill think about it after this project goes live. Again, your comments and suggestions are more than welcome.

A perl script is fine for an initial bulk load... but I'm wondering what process is in place to transfer new users. The reason I'm asking, is that very same process should serve to transfer all the users' the first time also.

>> That is something that i haven't thought of at this point. My first idea is to check the ldiff files for the differences and update the luminis db with just those differences. I dont have a script for it right now, but i guess iwill think about it after this project goes live. Again, your comments and suggestions are more than welcome.
»

Is your school using SCT

Is your school using SCT Banner?
If you use banner, there are built in ways to export all users to an xml file.

Since you have an ldif file, I'm assuming that all your users are in an ldap of sorts already. Have you considered just making luminis authenticate against your current ldap?

In regards to the luminis user info that would reside in the luminis ldap, how do you intend to import new users on an ongoing basis (if not using Banner?)?

A perl script is fine for an initial bulk load... but I'm wondering what process is in place to transfer new users. The reason I'm asking, is that very same process should serve to transfer all the users' the first time also.

thank you for your comments jason

Is your school using SCT Banner?
If you use banner, there are built in ways to export all users to an xml file.

>> Our school is just now trying to implement Banner. For now, we have htmldb based application called WebReg and couple of other applications.

Since you have an ldif file, I'm assuming that all your users are in an ldap of sorts already. Have you considered just making luminis authenticate against your current ldap?

>>At this point we have EAS setup. But it is my understanding (or atleast thats what i have been told) that eventhough luminis checks for authentication through ldap, it still needs user accounts in its db to compare the usernames. I am not so sure about the technical teminology used for this process ( i guess authentication and authorisation). But please feel free to correct me if i am wrong.

In regards to the luminis user info that would reside in the luminis ldap, how do you intend to import new users on an ongoing basis (if not using Banner?)?

>> That is something that i haven't thought of at this point. My first idea is to check the ldiff files for the differences and update the luminis db with just those differences. I dont have a script for it right now, but i guess iwill think about it after this project goes live. Again, your comments and suggestions are more than welcome.

A perl script is fine for an initial bulk load... but I'm wondering what process is in place to transfer new users. The reason I'm asking, is that very same process should serve to transfer all the users' the first time also.

>> That is something that i haven't thought of at this point. My first idea is to check the ldiff files for the differences and update the luminis db with just those differences. I dont have a script for it right now, but i guess iwill think about it after this project goes live. Again, your comments and suggestions are more than welcome.
»

the real problem

The real problem here is how to get info into the Luminis ldap when there is not enough info in the Banner database yet (i.e. in our case we are implementing Banner and the Luminis portal at the same time.) We went live with the Finance module on July 1, 2006 and then went live with the portal on January 2, 2007. Since Finance was the only module in Banner the "finance" role was the only role that could be calculated for anyone. The LDIS Extract process will not include someone in the xml extract if it cannot calculate a role for them. That was fine for the 200 some odd finance users but what about the rest of our users? How do I get them into the portal? My answer was to write a PERL script that ran against a text file of SCT ID's for all of our student users, employee users, faculty users, etc, running the script separately for each role. (Getting multiple roles assigned is a little bit trickier but not too bad.) The script then generates an LDISP 2 compliant xml file that could then be imported into the Luminis ldap. Its not a perfect solution but it takes care of about 90% of the work of getting those users in. (give or take a few percentage points depending on your institution.) My folks here were really helpful in providing me with separate lists of SCT ID's for each of our roles so I was lucky there.