Wednesday, March 9, 2016

Special Character Apostrophe (') in distinguished name for user creation syntax

Didn't find many references on how to deal with special character apostrophe (') in distinguished name, so hopefully this note helps few of them out there.

While working on user access issue in a Enterprise User Security "EUS" to convert a local database account into global private schema I came across a situation to convert a user with distinguished name (dn name) having apostrophe.

Example:
A user defined in Active directory "Sam O'Connell" has database account  "xyz123", while converting it to a private schema to make it start authenticating globally encountered below error

SQL> alter user xyz123 identified globally as 'CN=O'connell\, Jr\, Sam,OU=Amon,OU=US-Users,OU=US,DC=corp,DC=abc';alter user xyz123 identified globally as 'CN=O'connell\, Jr\, Sam,OU=Amon,OU=US-Users,OU=US,DC=corp,DC=abc'                                                       *ERROR at line 1:ORA-00911: invalid character

Seems it doesn't like the (') in O'connell

Thanks to this Apostrophe-link, work around is as follows, seems to escape a apostrophe use apostrophe as an escape character.

SQL> alter user xyz123 identified globally as 'CN=O''connell\, Jr\, Sam,OU=Amon,OU=US-Users,OU=US,DC=corp,DC=abc';
User altered.

Hopefully you find this helpul.

Sunday, February 21, 2016

AIX Server Serial#

If ever you need to check the serial# for the AIX Server, use the below command
lsconf | grep -e "Machine Serial"