| |
takeda kozo
Posts: 83
Score: 0
Joined: 11/9/2005
Status: offline
|
Does anyone know a way to connect to Novell via VBS (I am guessing that LDAP can be used for this, but have never worked with Novell before) and retrieve: - the groups that a user is a member of - the network drives that a user will be assigned when logging into the domain I've just completed a script which can be used for Active Directory, but I also need one for our Novell users as it's a mixed domain If anyone can help me out, then fantastic. If nobody can, then at least I hope someone can benefit from the AD version :) '_____________________________________________________________________________ On Error Resume Next strDom = "YOUR_DOMAIN_NAME" strUser = strSID ' This value is returned from a previous section (domain logon name) strUser = strDom & "\" & strUser const ADS_NAME_TYPE_NT4 = 3 const ADS_NAME_TYPE_1779 = 1 const ADS_NAME_INITTYPE_DOMAIN = 1 Dim Trans Set Trans = CreateObject("NameTranslate") Trans.Init ADS_NAME_INITTYPE_DOMAIN, strDom Trans.Set ADS_NAME_TYPE_NT4, strUser LdapDN = Trans.Get(ADS_NAME_INITTYPE_DOMAIN) Set objUser = GetObject("LDAP://" & LdapDN) For Each strGroup in objUser.MemberOf strGroupPath = "LDAP://" & strGroup Set objGroup = GetObject(strGroupPath) If InStr(objGroup.CN,"JPDRV") Then ' <======================= (you will need to modify this line, depending on how your groups are named) DriveArrayLine = Split(objGroup.CN,"--") ' <======================= (you will need to modify this line, depending on how your groups are named) If Lcase(DriveArrayLine(3)) = "%username%" Then DriveArrayLine(3) = strSID FullPath = "\\" & DriveArrayLine(2) & "\" & DriveArrayLine(3) Wscript.Echo "Drive Letter: " & DriveArrayLine(1) Wscript.Echo "Drive Path: " & FullPath End If Next '____________________________________________________________________________ Maybe this won't work for everyone, as I am new to LDAP. But at least it will give some people an idea. Cheers ~
< Message edited by takeda kozo -- 10/16/2006 7:35:46 PM >
|
|