Author Topic: Looking for a script...  (Read 1849 times)

0 Members and 1 Guest are viewing this topic.

Offline rcantin

  • Visitor
  • Posts: 3
  • Karma: 0
Looking for a script...
« on: August 13, 2007, 02:00:56 PM »
Hi all,

My knowledge about scripting is lower than zero and I am wondering if there is a chance someone could help me with this one:

I got 315 client's account on my FTP server and I have to change all the password and re-enter theses in my excel file.

Can theses password be generated from a script? Is there a simple way to reaffect theses in Webmin?

Forgive my ignorance. Any help would be appreciated. Thank you.

Offline Publi-Script

  • Administrator
  • Hero Member
  • *****
  • Posts: 596
  • Karma: 16
  • Gender: Male
  • Automate your Life!
    • Publi-Script.com
Re: Looking for a script...
« Reply #1 on: August 14, 2007, 01:35:43 AM »
Hi and welcome to this forum,

Can your password be generated by a script? Of course, and quite easily at that. Question is, do you have a scheme in mind?

Can you input those new paswords to your FTP Server? I'd be tempted to say yes. I do not know Webmin but I notice that you can batch create users from a text file 9in the form of "username:realname:password:ftp-flag:email-flag:quota:[extras]:[forwards]:[databases]"). Applescript is great at generating text files. the question here is do you have all that information available to you?
Michel Lemieux
Forum Administrator
-------------------------
OS X 10.6.4
Quark 6.5 / 7.5 / 8.1.6
Adobe Design Premium CS / CS2 / CS3 / CS4 / CS5
Script Debugger 4.5

Offline rcantin

  • Visitor
  • Posts: 3
  • Karma: 0
Re: Looking for a script...
« Reply #2 on: August 14, 2007, 07:11:07 AM »
Thank you Michel,

Yes I have all the information required and notice too about the batch processing line for edit/modify the users account.
Well the scheme is pretty simple : I keep a database in Excell for printing the list of the customer's account to give to my representatives.
Column 1 is UserName, column 2 is Password (actualy 6 digit), column 3 is Representative (to wich the notification is sent if there's a move in the account).
So now a rep flown to another Print facility with all the access code. You understand why I want to change theses password !

I know how to create the batch file for webmin to change the corresponding user attribute but dont know how to generate 315 password automaticaly (it would be great to update my excel file automaticaly too !). I would like zip code style, say for example a letter, a number, a letter... Maybe like this: a1b 2c3.

Of course we dont have to be secured as the N.A.S.A or the C.I.A but you know, competition...

Offline Publi-Script

  • Administrator
  • Hero Member
  • *****
  • Posts: 596
  • Karma: 16
  • Gender: Male
  • Automate your Life!
    • Publi-Script.com
Re: Looking for a script...
« Reply #3 on: August 14, 2007, 08:27:41 AM »
That sound simple enough...

I have a similar setup here that I created some time ago. In my setup, I keep everything insided a tabe delimited text file (easy to open in Excel as any time). My setup is tied into Eudora for email notifications for when I upload stuff to one of my suppliers FTP space. I even have a littlle script that sends (or resends) the required FTP settings for accessing any given FTP space.

This workflow of mine does not actually manage the account themselves (this is carried out by out IT department) but it does generate all the necessary information. In your situation, I do not think being able to automatically create these accounts is essentiel. One the "accounts text file" is generated, it is pretty easy to send it to Webmin for batch process.

To get you started, I would suggest you first setup an Excel file with the necessary column information. As I said, Webmin batch process requires a text file formatted in the following fashion:

Quote
username:realname:password:ftp-flag:email-flag:quota:[extras]:[forwards]:[databases]
*anything in bracket being "optional"

I just briefly looked at Webmin, so I am not sure of this, but there might be a way to extract such a text file from your current FTP Server. If that is the case, your job will be that much easier.

In any case, you'd be best to setup your Excel with these information in the same order, just forget about the colons (":")

BTW, you can have Excel generate the passwords by way of formula. For this, type the following in the formula bar:
Quote
=CHAR(ROUND(RAND()*25,0)+65) & ROUND(RAND()*9,0) & CHAR(ROUND(RAND()*25,0)+65) & " " & ROUND(RAND()*9,0) & CHAR(ROUND(RAND()*25,0)+65) & ROUND(RAND()*9,0)
The is one caveat though, when supplying passwords in a printed form, I normallty don't like using "0" (zero's) or "O" (O's) as well as "1" (one's), "I" (capital I's) and "l" (lowercase l's). That out of the way will cut down a lot of "my password doesn't work" messages. The above formula does not take this into consideration. You can always manually search and replace them once they are generated.

All in all, the whole thing can be done without applescript, but I'd be happy to provide one if you desire.
Michel Lemieux
Forum Administrator
-------------------------
OS X 10.6.4
Quark 6.5 / 7.5 / 8.1.6
Adobe Design Premium CS / CS2 / CS3 / CS4 / CS5
Script Debugger 4.5

Offline rcantin

  • Visitor
  • Posts: 3
  • Karma: 0
Re: Looking for a script...
« Reply #4 on: August 14, 2007, 08:40:12 AM »
Thanks Michel for your time. I appreciate.

I will try it within Excel and watch for the caveat you mentioned. I too does'nt like password or serial numbers with misleading character.

Have a great day!