I had this same conversation offline, so I figure it might be nice to post it publicly.  For posterity ;)
 
the problem is that the samaccountname is defined incorrectly.
 
should be

group.Put "sAMAccountName", "gg-" & unitNo & "-Staff"

vs.

group.Put "sAMAccountName", "cn=gg-" & unitNo & "-Staff"

 

Note the CN= in the version that gives that weird error. 

 

 



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Desmond
Sent: Friday, September 02, 2005 10:21 AM
To: [email protected]
Subject: RE: [ActiveDir] goofy script error

Yeah checked that … it gets set to cn=gg-1234-Staff, my test unit number.

 

Thanks,
Brian Desmond

[EMAIL PROTECTED]

 

c - 312.731.3132

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Al Mulnick
Sent: Friday, September 02, 2005 8:27 AM
To: [email protected]
Subject: RE: [ActiveDir] goofy script error

 

I'll discount the user as a source of goofiness ;)

 

Was it me, I'd troubleshoot by figuring out what this is set to at runtime

 

cn=gg-" & unitNo & "-Staff"

 

I'd also make sure that whatever it is that's being created, doesn't already exist.  Starting with figuring out what that becomes at run time is the first step for me though.

 

Al

 

 

 


From: [EMAIL PROTECTED] on behalf of Brian Desmond
Sent: Thu 9/1/2005 6:04 PM
To: [email protected]
Subject: [ActiveDir] goofy script error

I’m getting a weirdo error from a script I wrote. It works all up to this point. This first block of set group thru the second group.setinfo works like a charm (as do 3 nearly identical calls above it). The second set, on the group.SetInfo line, I get this error:

 

C:\createSchool.vbs(111, 1) (null): A device attached to the system is not functioning.

 

Set Group = workingOU.Create("Group", "cn=gg-UserMgrs-" & schoolName)

group.Put "sAMAccountName", "gg-UserMgrs-" & schoolName

group.Put "groupType", ADS_GROUP_TYPE_GLOBAL_GROUP Or ADS_GROUP_TYPE_SECURITY_ENABLED

group.SetInfo

group.PutEx ADS_PROPERTY_APPEND, "member", Array(techGroupDN) ' nest the tech group

group.SetInfo

 

Set Group = workingOU.Create("Group", "cn=gg-" & unitNo & "-Staff")

group.Put "sAMAccountName", "cn=gg-" & unitNo & "-Staff"

group.Put "groupType", ADS_GROUP_TYPE_GLOBAL_GROUP Or ADS_GROUP_TYPE_SECURITY_ENABLED

group.SetInfo

 

Set Group = workingOU.Create("Group", "cn=gg-" & unitNo & "-Students")

group.Put "sAMAccountName", "cn=gg-" & unitNo & "-Students"

group.Put "groupType", ADS_GROUP_TYPE_GLOBAL_GROUP Or ADS_GROUP_TYPE_SECURITY_ENABLED

group.SetInfo

 

note, working OU is an OU I created in a previous step (along with probably a dozen or so other OUs).

 

I don’t have physical access to the machine, but I think all the attached devices are working just fine <g>.

 

Google has a low yield here, so, not sure.

 

Thanks,
Brian Desmond

[EMAIL PROTECTED]

 

c - 312.731.3132

 

 

 

Reply via email to