code:
    If Len($SAMAcctName) > 20
; "SamAccountName CANNOT be bigger than 20 characters"
$SAMAcctName = left($SAMAcctName, 20)
;WriteLog2($LogFile, "Function: CreateADGroup - Trimming SAMAcctName to 20 characters")
? "Function: CreateADGroup - Trimming SAMAcctName to 20 characters"
EndIf

Even in NT4, you can make group names longer than 20 characters with code, but the supporting interface in User Manager can not process them. The tool has the limitation not the under lying data store. So you have to be cautious to build your names to the least common denominator for everything to work.

quote:

sAMAccountName
Required. Specify a string that is the name used to support clients and servers from a previous version of Windows®. Note that the sAMAccountName should be less than 20 characters to support clients from a previous version of Windows.
The sAMAccountName must be unique among all security principal objects within the domain. You should perform a query against the domain to verify that the sAMAccountName is unique within the domain.



[ 23. October 2003, 18:52: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/