Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Active directory Full Name LDAP entry


Recommended Posts

Posted

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 :p

Posted

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

Posted

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.

Posted

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 :)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...