ADModify Syntax first initial last name Change Common Name

Feb 1, 2008 at 3:22 PM
Edited Feb 1, 2008 at 3:41 PM
I wanted to change the syntax on our Common Name. After Running the ADMT on our environment it changed all the usernames to First Name Last Name (John Smith). I need to return those names to First Initial LastName (jsmith). But I'm not sure how to make the SamID match the Common Name.

I need the syntax because this will be run using the admodcmd.exe option. I will not be using the GUI interface. I know that %'sn'%,%'givenName'" is LastName, FirstName. But I need to match the logon name or SamID. In other words change the Common Name = sAMAccountName.

Any assistance on the syntax would be great.

Thanks

Dontribi
Feb 1, 2008 at 3:51 PM
Nevermind I'm a tool......I figured it out. It is %'sAMAccountName'%

Thanks



dontribi wrote:
I wanted to change the syntax on our Common Name. After Running the ADMT on our environment it changed all the usernames to First Name Last Name (John Smith). I need to return those names to First Initial LastName (jsmith). But I'm not sure how to make the SamID match the Common Name.

I need the syntax because this will be run using the admodcmd.exe option. I will not be using the GUI interface. I know that %'sn'%,%'givenName'" is LastName, FirstName. But I need to match the logon name or SamID. In other words change the Common Name = sAMAccountName.

Any assistance on the syntax would be great.

Thanks

Dontribi

Feb 1, 2008 at 3:51 PM
Edited Feb 1, 2008 at 6:14 PM
I figured it out. It is %'sAMAccountName'% . But this syntax does not work in the command line. I put the syntax -custom CN %'sAMAccountName'% and received and error:

<user UserDN="LDAP://CN=johnny danger,OU=Trash,OU=TEST,OU=AD,DC=corp,DC=DOMAIN,DC=com" type="Failure" attribute="CN" message="ADMODIFY.ERR - The directory service cannot perform the requested operation on the RDN attribute of an object. (Exception from HRESULT: 0x80072016)" />


Thanks



dontribi wrote:
I wanted to change the syntax on our Common Name. After Running the ADMT on our environment it changed all the usernames to First Name Last Name (John Smith). I need to return those names to First Initial LastName (jsmith). But I'm not sure how to make the SamID match the Common Name.

I need the syntax because this will be run using the admodcmd.exe option. I will not be using the GUI interface. I know that %'sn'%,%'givenName'" is LastName, FirstName. But I need to match the logon name or SamID. In other words change the Common Name = sAMAccountName.

Any assistance on the syntax would be great.

Thanks

Dontribi