Hi! I have attached a tarball containing collection of scripts that extend and add to the current net cmd functionality. newscriptadv.py based on the existing newuser cmd utility but adds ability to specify custom prefix to users container as compared to default CN=Users and allows filling some (but not all although full set could be added) of the other parameters such as first name, initials, last name, decription etc newgroupadv.py based on newuser tmeplate it allows addition of new groups with ability to specify custom prefix to groups container and allowing definitaion of additional parameters such as description, email and type and scope of the group two diffs samdb.py.diff and __init__.py.diff contian extensions to the existing code to allow extended functionality of the above two scripts
Created attachment 5740 [details] Attached patch files
This is Python stuff. So reassigning it up to Jelmer.
Thanks for the patch! Can you please send it to the mailing list as a single unified diff mentioning it fixes this bug report? A couple of things I noticed while looking at the patch: * please use dashes rather than CamelCasing in argument names, consistent with the rest of Samba * please avoid tabs in python code, use spaces everywhere (in compliance with PEP8)
Thx Jelmer, diff sent to the list. I have also noticed that when account is created in AD through mmc's Active Directory Users and Computers the CN is CN=GivenName Initals. Surname (if any of them are defined) or CN=username (if none of the GivenName, Initals and Surname is defined) newuser script seems to use tha latter format, which i personally prefer - is this by design?
Well, I think we chose the latter format since it's easier to apply it ;) But if you really like to be consistent with the MMC then I would start a discussion on the technical mailing list.
Merged.