Is there any way to change the standard 20 character UserName maximum length restriction for local accounts?
(Server 2008 R2 to be specific)
Is there any way to change the standard 20 character UserName maximum length restriction for local accounts?
(Server 2008 R2 to be specific)
Nope, it's fixed at 20. I believe this is for backward compatibility reasons. You can go bigger in Active Directory (except for the SAMAccountName field), but not locally.
You must be referring to the sam-accountname attribute. Logon names have to follow these rules:
Note that the GUI only lets you create 20 char names, you would have to create them programatically to get past 20.
"Note that the GUI only lets you create 20 char names, you would have to create them programatically to get past 20."
I would say that that statement is incorrect. I cannot programmatically create usernames greater than twenty characters. Below is the relevant VB.NET code that I ran on Windows Server 2008 R2. It works for creating user names of twenty or fewer characters, but throws an exception if the username exceeds twenty characters. Try it yourself. Sincerely, Joseph Davoli
Code:
I'm using DSADD into W2K3 AD Server, it's failed due to 21 (twenty one) characters length of "SAMID".
It's solved while decrease the UPN.
Any comments for improvement are welcome.