Custom script for logon.bat generation

Hello!!

One of the companies i work for integrates a SAMBA PDC to manage the network domain logons. We have around thirty users, that want to logon into their Windows workstations and have the shares available. So we needed logon scripts for each one of them.

We implemented groups for policy enforcement. Making a custom logon script for each user wasn't an option, so we created a little custom script in Python to generate the logon scripts.

It grabs the groups which the user belongs and creates the script for that user, which is deleted after the user logs off.

The script is very simple and was made for our specific issue, it lacks generality and some error checking, but might be useful for anyone, so we decided to share it.

Grab the Python script here:
logon.py

Example batch file generated:
user1.bat

I have been thinking on porting it to Ruby and making it more generic. For now it's working as we need it to work, we have also the same setup in a school without any problems.

Someday i will post about our implementation, which includes Samba, OpenLDAP, FreeRADIUS and m0n0wall and implements, PDC, Domain Logons, Captive Portal, Wireless, with centralized authentication for all.

But for now it's all!

Taxonomy upgrade extras: