Hi,
As other's have already indicated, you could look at the 2015 SDK to generate a plugin. (see https://msdn.microsoft.com/en-us/library/gg328515.aspx)
One of the logical challenges you might have (with your 2 option set values) is whether MS CRM knows when you wish for it to fire the plugin. Will you fire this only on 'create'? What if you wish to recreate the password? Personally I would create a
workflow plugin and allow for it to be manually fired as well as fired when the option set is changed.
You would also logically have an issue with generating a user friendly username. i.e. 'ZX634' might not be a great username. Another danger is that you might generate a 'rude' username (i.e. one offensive in Italian, but innocent in English). As your username
is going to be related to the account, you might want to generate it based on the first X digits of the account name plus some random chars thereafter.
The password could simply be a group of random chars (as already stated)
Karlo Swart Ver206
V206 Mail