T
Torsten Valentin
In the past I got some help from the people in this forum. I needed to add a
user to the group "Builtin/Admins", while I didn't know abot the language
version the DC is running. I got a hint to add the user using the well known
SID of that group. That worked pretty well and the following VB-code just
did what I wanted:
Set grp = GetObject("LDAP://" & GetDomainServer &
"/<SID=01020000000000052000000020020000>") ' SID for Builtin/Admins
grp.Add ("LDAP://CN=" & UserName & "," & Location)
'GetDomainServer, UserName and Location have been provided by other
functions and are strings
Now I need to add a user to the group "Users/Domain-Admins" as well. But
"Users/Domain-Admins" does not have a well known SID like "Builtin/Admins"
as far as I know, so it seems like I cannot just convert the SID into the
HEX-stringized format and go like above.
Can anybody give me a hint, how to add a user to that group in a language
independant way?
Thanks in advance!
Regards,
T.
user to the group "Builtin/Admins", while I didn't know abot the language
version the DC is running. I got a hint to add the user using the well known
SID of that group. That worked pretty well and the following VB-code just
did what I wanted:
Set grp = GetObject("LDAP://" & GetDomainServer &
"/<SID=01020000000000052000000020020000>") ' SID for Builtin/Admins
grp.Add ("LDAP://CN=" & UserName & "," & Location)
'GetDomainServer, UserName and Location have been provided by other
functions and are strings
Now I need to add a user to the group "Users/Domain-Admins" as well. But
"Users/Domain-Admins" does not have a well known SID like "Builtin/Admins"
as far as I know, so it seems like I cannot just convert the SID into the
HEX-stringized format and go like above.
Can anybody give me a hint, how to add a user to that group in a language
independant way?
Thanks in advance!
Regards,
T.