Solved

ASP Novell User Lookup / Login

Posted on 2004-08-10
5
326 Views
Last Modified: 2012-08-13
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
Comment
Question by:bolesj
5 Comments
 
LVL 15

Expert Comment

by:joeposter649
ID: 11763349
Not sure if this is your problem but sometimes you use "+" instead of "&" to concat strings.
0
 
LVL 1

Author Comment

by:bolesj
ID: 11763691

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
 
LVL 1

Author Comment

by:bolesj
ID: 11774937

Problems were due to permissions.

Admin - Please Delete this
0
 
LVL 6

Expert Comment

by:masirof
ID: 12728169
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
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12752366
PAQed with points refunded (250)

modulo
Community Support Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now