MK-2 Posted September 12, 2011 Posted September 12, 2011 OK this is a weird one for me. In AD all of our users when you click on an OU show their full name in the right hand list, so you will see Joe Bloggs, etc not jbloggs. Now i have a little tool to add users but when its done, they show up as JBloggs. I have the tool set to change givenName, sn and displayName. Now it looks like when you manually change it, it thinks it is the full name, not display name, sn,givenName or anything else. Is there an LDAP variable for this that I can have it manually change? If none of this makes sense I can get screenshots to show what i'm on about, but hopefully someone will be able to figure out my wild rantings
SYNACK Posted September 12, 2011 Posted September 12, 2011 What's the little tol, I'm thking incorrect mappingsof attributes may be the cause.
MK-2 Posted September 12, 2011 Author Posted September 12, 2011 It's one i created in autoit. _AD_ModifyAttribute($username, "displayName", $name) That line works and sets the display name to Joe Bloggs _AD_ModifyAttribute($username, "name", $name) _AD_ModifyAttribute($username, "cn", $name) These two don't and set it to JBloggs. If I manually rename it afterwards, I can see that cn and name have both changed from JBloggs to Joe Bloggs
SYNACK Posted September 12, 2011 Posted September 12, 2011 Have you tried setting them in a different order, first and last name first then display name after as depending on how autoit does it setting the name variables may regenerate a new displayname based on the other names. Maybe post the autoit script for those that know it to have a look. I usually use vbs or powershell so may not be of too much help.
SYNACK Posted September 12, 2011 Posted September 12, 2011 Your attribute names may be wrong too, check this out for the names: LDAP Attributes. Properties Active Directory Users Computers Distinguished name 1
MK-2 Posted September 12, 2011 Author Posted September 12, 2011 Just had a reply from the guy who created the active dir attributes "cn" can't be modified by _AD_ModifyAttribute because it's part of the FQDN. To change it you have to use _AD_RenameObject. Just done that and it works! Thanks for the input anyway
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now