[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 339
  • Last Modified:

ASP Novell User Lookup / Login

I am attempting authenticate users via their Novell login information from
a simple asp page (NOT .NET). I am new to Novell and I have run into a
bunch of problems that I cannot figure out. For some reason when I search
our from the root of our tree I cannot find any users. If I search within
my Context I can find some users but not all but if I search outside my
context I find nothing. I have searchScope set to qrySearchSubtree which
should search all entries. I assumed that this may be due to permissions
but I ran another novell sample and I am able to traverse the entire tree
via code (below). So I am lost, anyone know what I may be doing wrong?



'------- SEARCH CODE ------------------------------
DoSearch("Doe_John","ComanyName") -> ( zero results )
DoSearch("Doe_John","ComanyName\USA") -> ( zero results )
DoSearch("Doe_John","ComanyName\USA\WashingtonDc\Users") -> ( user Found )


(from novell site)
Sub DoSearch (strUserCn, treeName)
        Dim retCode, objectFilter, treeNameDim,nwdirQ, results, result  
        ObjectFilter= "User(CN = "&strUserCn&")"
        'On Error Resume Next  
        set nwdirQ=Server.CreateObject("NWDirQueryLib.NWDirQuery.1")  
        nwdirQ.FullName="NDS:\\"+treeName
        nwdirQ.maximumResults=100  
        nwdirQ.SortKeys="CN"  
        nwdirQ.Filter=objectFilter  
        nwdirQ.SearchMode=0   ' synchronous !  
        nwdirQ.SearchScope=2  
        set results=nwdirQ.Search
        Response.Write "Found ("&results.count&") objects"  
        For each result in results            
         response.write  
result.FullName", "&result.Layout&"")            

        Next      
        Set nwdirQ=Nothing
      End Sub

'--TRAVERSE CODE-----------------------------------------------------
 
      Sub ReadContainer(context,level)
        Dim entry, output, newContext, name
         On Error Resume Next  
         NWDir1.FullName=context  
         For each entry in NWDir1.entries                  
          If err.number Then        
            err.number=0        
            Exit For      
          End If
          name = entry.ShortName
          response.write vbnewline
          If entry.Layout.Container=TRUE then        
            Response.Write ""
              newContext=context+"\"+entry.ShortName                  
              call ReadContainer(newContext ,level+1)      
            Response.Write "" 
          else
            Response.Write ""         
          End If      
          totalObjects = totalObjects +1  
        Next
      End Sub
     
      Sub ListDSTree(treeName)
        Dim retcode, fullName, level  
        NWDir1.FullName = NWDir1.FullNameFromTreeAndContext
(treeName,"[Root]")  
        fullName=NWDir1.LoginName  
        response.write "(Listing the whole DS tree structure  may take
some time !)"  
        response.write "" & treeName & "   "   
        totalObjects=1        
        Response.Write ""
          call ReadContainer("NDS:\\"+treeName,1)        
        Response.Write ""         
        response.write "Total objects found: " & totalObjects
      End Sub
     
      dim totalObjects
      ListDSTree("TreeName")

0
bolesj
Asked:
bolesj
1 Solution
 
joeposter649Commented:
Not sure if this is your problem but sometimes you use "+" instead of "&" to concat strings.
0
 
bolesjAuthor Commented:

The "+" signs do not seem to make a difference. They are from the Novell site and i changed them to "&" and still get the same result.

john
0
 
bolesjAuthor Commented:

Problems were due to permissions.

Admin - Please Delete this
0
 
masirofCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned..
I will leave the following recommendation for this question in the Cleanup topic area:
PAQ - Refund

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

masirof
EE Cleanup Volunteer
0
 
moduloCommented:
PAQed with points refunded (250)

modulo
Community Support Moderator
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now