Month: July 2012

Creating FileZilla User via VBScript in a Troll-Averse World

I recently needed some code to generate FTP user accounts (with password and folder name) via command-line parameters, using data stored in another application.

What turned out to be the biggest challenge, was resisting hunting down and immolating the several internet trolls I came across whose sole contribution is negativity. In looking for help on how to do this (what with me not being a developer) I reached out to the tinterweb, but received naught but derision – surprisingly, from Stack Overflow and a FileZilla forum administrator.

I finally found someone who had posted something of value, and so in the end, I used VBScript to take the data already stored in another application to create a username and password for the FTP account, and a folder, all with appropriate permissions. We use FileZilla as the FTP Server, so it was a case of generating text containing the relevant data, and inserting it at the right location into the user settings file, in the appropriate XML format. Oh, and I had to convert the plain-text stored password (owch, I know!) to MD5 hash.

I attach the VBscript, by way of an “up yours” to the aforementioned trolls, in case anyone else ever needs to do the same thing. No doubt they’ll criticise the style, content, method, blah, blah, blurgh … I don’t care – it may be dirty, and possibly inefficient (and as such, probably offensive to some), but it works.

The moral of this story? If there is one, it’s possibly that the help is out there, but the chaff is strangling the wheat.

We need more Troll Hunters.

VBScript to Create FileZilla User (dumped to MS-Word, to allow upload in WordPress)

I should mention, of course, that this wouldn’t have been possible without the help of Shawn K. Hall – many thanks…