mark.cooke at siemens
Mar 28, 2012, 1:38 AM
Post #2 of 2
> -----Original Message-----
RE: Trac - with LDAP Authetication change Domain
[In reply to]
> From: trac-users [at] googlegroups On Behalf Of Bua
> Sent: 27 March 2012 19:06
> To: Trac Users
> Subject: [Trac] Trac - with LDAP Authetication change Domain
> Dear reader,
> i have a question about the User alignment in the Trac system.
> the situation:
> we integrate a new company in our company, and they use the Trac
> system. This system is configured to access the Page over LDAP
> in their Active Directory And everything is working, ticket
> assignment will have their Username from Active Directory.
> now my problem and question:
> Now they change the Windows Domain and their AD-Accounts. And the
> User alignment of the old Users/Domain will be loosed. Is it
> possible to change the alignment in the Trac database to the new
> UserID!? Or what can i do to solve this.
> ATTETION i cannot use any other fields of Active Directory to
> authenticate the User to Trac. We use another Identity Management
> system (UserMetaDB) that synchronize with Active Directory.
> I hope everyone has an idea or an solution for that.
> many thanks' for any solution or idea!
> best regards,
Well... If you use apache and mod_wsgi, you could add some python into your WSGI scrpit to do a lookup and convert the new usernames to the old ones, and keep all the data the same. Not sure I recommend this as it does not fix your problem and depending on the number of users it will slow down each request...
def application(environ, start_response):
# Make sure usernames are lower case...
environ['REMOTE_USER'] = environ['REMOTE_USER'].lower()
# Strip any domain if present (should only ever be one)
while "\\" in environ['REMOTE_USER']:
environ['REMOTE_USER'] = environ['REMOTE_USER'].split("\\", 1)
# Do lookup here...
environ['trac.env_parent_dir'] = r'/parent/path'
return trac.web.main.dispatch_request(environ, start_response)
If that doesn't work for you, you could take all your trac instances offline and run some SQL statements to update all of the data records with the new values. I suspect this could be a lot of work but there may well be plugins at trac-hacks.org to help with some of this (something like batchmodifyplugin for example).
~ mark c
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.