Hello everyone, I am new to the forum community and need help with some scripts. First off let me put that this is “NOT” a homework assignment as I have been given this information where I work (IUPUI-UITS) and need help on this since I have no experience in this area. The only reason I am turning to forum posting is the person that ran the system is no longer available and now it is on me to run this so I am trying to find out whatever information I can. I just want to see what people may suggest about the code posted and good sites that may relate to what I am asking.

I have attached what I have been given so far and these are scripts that have been passed on to me. To tell the truth I have never really worked with scripts and have no clue how these even work (so any information or help that is dumbed down would be beneficial). The person that passed this on to me is no longer is available to be reached and they did not provide any documentation on this information.

I know the scripts are supposed to create new users to be used with mysql and phpmyadmin on a server. My questions are how do these even work and what do they do? Also if anyone has suggestions on how to make these more effective and secure feel free to try and help out or point me in the right direction. Another thing that I was wondering with these is how would I go about making changes to allow tracking of the accounts created and to create a script to remove all files associated with a specific user and have it stored in an archive. Thanks everyone and I appreciate you help.

Those scripts are very poorly written. I'm pretty curtain they were written by a student for a homework assignment. I can not believe that an IT admin at "University Information Technology Services" would write and use such code in a production environment.

Based on your other thread where you're offering to pay someone to "get this task completed very soon (less than 1 week)", I can only assume that you are a student at UTIS and this is your homework assignment. If that's not the case, then you need to tell the people that assigned this task to you that you will need more time to learn how to program.

Thanks for the reply. It is a sad fact but that is what they are using to create users for a few of their classes on the campus that use mysql and phpmyadmin. I was assigned the task to revise these even though they know that I have no previous experience with this... Well I will look into those links and hopefully get somewhere on this. Also the reason I was wanting to pay someone is that I do not want to get fired over this ordeal if I cannot get what they want done by the end of the month (talked them into giving me another week : /). As with the state law here they can fire someone for anything... Thanks again.

It is supposed to be a Perl script and there isn't even one single Perl command, just a list of system commands with shell commands. Why is it not done in a shell script?

I agree with Fishmonger, these scripts should most probably be completely rewritten from scratch.

One last additional point: it seems, from what you are saying, that you have been asked to rewrite/improve/refactor these scripts whereas you are not a developper (or at least not a Perl developper). I am a bit surprised (which is not to say that I challenge in any respect what you are saying). A university usually has a huge mass of talented individuals with knowledge in dozens of different technologies. And Perl might not be the dominant language today, but it is still probably among the top 5 or at least top 10 languages of today. I am puzzled that your university does not have the necessary competencies. Can you please give me the name of that university, I want to make sure that my children will not go to such a rotten place (this is not just rhetorical discussion, my son will actually be completing next year his IT master cursus, I really want him to go in a real place).

You probably noticed this as well, but the "create-accts.pl" script doesn't do anything and the "script.pl" script doesn't do what it's supposed to do because 2 key vars ($i and $n) are never assigned any value.