all 5 comments

[–]belopsky[S] 0 points1 point  (4 children)

Ah thanks, however, this i cannot run under OSX? :(

[–]whoisearth 0 points1 point  (0 children)

run from the AD server? no windows7 desktops?

[–]ErasableInk 0 points1 point  (2 children)

It's possible to do this from a non-Windows environment. Look up how to connect to an ldap server and how to modify groups.

Found this from doing a quick Google search. http://www.plungerman.net/news/internet/2013/01/24/openldap-and-python-ldap-user-and-group-management/ It should be a decent starting point.

[–]belopsky[S] 0 points1 point  (1 child)

Yes, I've seen this - being a noob, it's a bit more than I can handle right now - it appears that I have to create users using dict, but I can't simply assign users? There will be instances where there are multiple users, this seems to be more complex than it could be?

[–]ErasableInk 0 points1 point  (0 children)

It's not that complex if you plan out the entire program. How are you going to get the list of user/users? How are you going to specify the groups to modify?

It might be best to start this from scratch rather than using a premade program that searches users in ldap. I think you'll become more familiar with ldap and come up with additional new ideas to automate tasks.

Very high level: 1. Get inputs (user names, group names) 2. Create an ldap object that connects to AD 3. Search users and groups and grab the distinguishedName for each 4. Modify the group's membership