Discussion:
Invalid characters for a username.
(too old to reply)
akg414s
2008-07-30 14:51:02 UTC
Permalink
I need a list of characters that can't be used for an Active Directory
username.

Thanks
Paul Bergson [MVP-DS]
2008-07-30 15:12:27 UTC
Permalink
Here you go:
http://support.microsoft.com/kb/909264
--
Paul Bergson
MVP - Directory Services
MCTS, MCT, MCSE, MCSA, Security+, BS CSci
2008, 2003, 2000 (Early Achiever), NT4

http://www.pbbergs.com

Please no e-mails, any questions should be posted in the NewsGroup
This posting is provided "AS IS" with no warranties, and confers no rights.
Post by akg414s
I need a list of characters that can't be used for an Active Directory
username.
Thanks
Richard Mueller [MVP]
2008-07-30 16:15:19 UTC
Permalink
That's a good reference, although it applies mostly to computer objects. I
need to add "\" and "/" to my list of characters not allowed in
sAMAccountName's. However I retested and still am not able to create users
with the charcters "[", "]", ";", "=", or "+" in the sAMAccountName. I have
not tested computer or group objects.
--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
Post by Paul Bergson [MVP-DS]
http://support.microsoft.com/kb/909264
--
Paul Bergson
MVP - Directory Services
MCTS, MCT, MCSE, MCSA, Security+, BS CSci
2008, 2003, 2000 (Early Achiever), NT4
http://www.pbbergs.com
Please no e-mails, any questions should be posted in the NewsGroup
This posting is provided "AS IS" with no warranties, and confers no rights.
Post by akg414s
I need a list of characters that can't be used for an Active Directory
username.
Thanks
Richard Mueller [MVP]
2008-07-30 15:16:40 UTC
Permalink
Post by akg414s
I need a list of characters that can't be used for an Active Directory
username.
Thanks
If you mean the "Pre-Windows 2000 logon name", the following are not
allowed:

[ ] : ; | = + ? < > * "

I'm not aware of any characters that are not allowed in Common Names. The
characters above are allowed. However, if any of the following are used they
must be escaped with the backslash "\" escape character:

, \ # + < > ; " =

In addition if you use ADSI (in scripting for example) the forward slash,
"/", must also be escaped with the backslash. For example, if the Common
Name of a user is "Last, First", then in VBScript you would bind to the
object with code similar to:

Set objUser = GetObject("LDAP://cn=Last\, First,ou=West,dc=MyDomain,dc=com")

Among the characters I have tested and found to be fine in Common Names (and
elsewhere in Distinguished Names, such as the name of an OU):

* ( ) . & - _ [ ] ` ~ | @ $ % ^ & ? : |
--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
Meinolf Weber
2008-07-30 16:34:29 UTC
Permalink
Hello akg414s,

Have a look here:
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/w2000Msgs/2586.mspx?mfr=true

http://support.microsoft.com/kb/938447

Best regards

Meinolf Weber
Disclaimer: This posting is provided "AS IS" with no warranties, and confers
no rights.
** Please do NOT email, only reply to Newsgroups
** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm
Post by akg414s
I need a list of characters that can't be used for an Active Directory
username.
Thanks
Richard Mueller [MVP]
2008-07-30 17:03:03 UTC
Permalink
Per your first reference, I need to add "," to my list of characters not
allowed. Just to be clear, the characters "(" and ")" are allowed, they just
enclose the list of invalid characters. I think the article meant to list /\
instead of \\. Otherwise, the list is good, but omits the characters "[" and
"]". I'm not able to use those. My list of characters not allowed in
sAMAccountName's for users is now:

[ ] : ; | = + ? < > * " / \ ,

All are allowed in common names, although some must be escaped (with "\").
--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
Post by Meinolf Weber
Hello akg414s,
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/w2000Msgs/2586.mspx?mfr=true
http://support.microsoft.com/kb/938447
Best regards
Meinolf Weber
Disclaimer: This posting is provided "AS IS" with no warranties, and
confers no rights.
** Please do NOT email, only reply to Newsgroups
** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm
Post by akg414s
I need a list of characters that can't be used for an Active Directory
username.
Thanks
Loading...