[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [HELP] .htaccess problem.......thanks.



Hello,

your problem seems to be that when Apache is doing the LDAP search, it 
does not get any match, while when you are doing a command line search, 
you get one match.

One difference between the searches is that you specify a user which is 
used to bind to the LDAP directory (-D "uid=tester,dc=ezplay,dc=tv"), 
while Apache doesn't bind as a specific user.
Try doing the command line search without the -D parameter. If you get 
no match, you may look at the access rights to your directory.

Regards,

Cato Aune

tirsdag 8. april 2003, 06:36, skrev axacheng:
> Very Thanks for all reply.  :-)
>
>
> Now , i type correct username & password in box that the web browser
> pops up when i attempts to access resource in protected area .
>
> its still didn't work    -____-
>
> its made me a pretty BAD mess of this problem ...............Help ...
> help.....i wanna die.......
>
>
> ● My LDAP tree as follow :
>
>     dc=ezplay,dc=tv
>
>           |---->uid=tester
>           |
>           |---->uid=axa.cheng
>           |
>           |__ou=td
>           |
>           |     |---->uid=bigbrother
>           |     |---->uid=bigcow
>           |
>           |__ou=md
>           |
>                 |____>uid=freesec
>
> ● However, when i execute "ldapsearch" command  , the result as
> follow:
>
> ldapsearch -W -x -h localhost -b "dc=ezplay,dc=tv" -D
> "uid=tester,dc=ezplay,dc=tv" '(&(objectclass=*)(uid=tester))'
> version: 2
>
> #
> # filter: (&(objectclass=*)(uid=tester))
> # requesting: ALL
> # tester, ezplay, tv
> dn: uid=tester,dc=ezplay,dc=tv
> uid: tester
> cn: tester
> objectClass: account
> objectClass: posixAccount
> objectClass: top
> objectClass: shadowAccount
> userPassword::
> e2NyeXB0fSQxJDddf5VU0YU5SJEQvQjRd3kFVdkppNTFQsdsISzl5WS8=
> shadowLastChange: 12128
> shadowMax: 99999
> shadowWarning: 7
> loginShell: /bin/bash
> uidNumber: 1008
> gidNumber: 100
> homeDirectory: /home/tester
> # search result
> search: 2
> result: 0 Success
> # numResponses: 2
> # numEntries: 1
> ^^^^^^^^^^^^^^^^^^
>  i got a entry now....... :-)
>
>
>
> ● My .htaccess as follow :
>
> AuthName "For Student to login"
> AuthLDAPUrl ldap://192.168.8.8/dc=ezplay,dc=tv?uid?
> AuthType Basic
>
> <Limit GET POST>
> Order deny,allow
> Deny from all
> Allow from all
> require user tester
> </Limit>
>
>
>
> ● in /var/log/apache/error.log as following :
>
> [Mon Apr  7 15:31:27 2003] [error] [client 192.168.10.254] Search
> must return exactly 1 entry; found 0 entries for search
> (&(objectclass=*)(uid=tester)): URI /admin [Mon Apr  7 15:31:28 2003]
> [error] [client 192.168.10.254] Search must return exactly 1 entry;
> found 0 entries for search (&(objectclass=*)(uid=tester)): URI /admin
>
>
>
> ● in /var/log/syslog :
>
> Apr  7 15:50:03 backup slapd[17788]: conn=3 op=4 SRCH
> base="dc=ezplay,dc=tv" scope=2
> filter="(&(objectClass=*)(uid=tester))" Apr  7 15:50:03 backup
> slapd[17788]: conn=3 op=4 SEARCH RESULT tag=101 err=0 text= Apr  7
> 15:50:05 backup slapd[17789]: conn=7 op=2 SRCH base="dc=ezplay,dc=tv"
> scope=2 filter="(&(objectClass=*)(uid=tester))" Apr  7 15:50:05
> backup slapd[17789]: conn=7 op=2 SEARCH RESULT tag=101 err=0 text=
>
>
>
> ==================================
> Hello List :
>
> i using .htaccess to restrict user to use web resource .
>
> However, i type correct username & password in box that the web
> browser pops up when i attempts to access resource in protected area.
>
> i got error message
>
> ● in /var/log/apache/error.log as following :
>
> [Mon Apr  7 15:31:27 2003] [error] [client 192.168.10.254] Search
> must return exactly 1 entry; found 0 entries for search
> (&(objectclass=*)(uid=tester)): URI /admin [Mon Apr  7 15:31:28 2003]
> [error] [client 192.168.10.254] Search must return exactly 1 entry;
> found 0 entries for search (&(objectclass=*)(uid=tester)): URI /admin
>
>
>
> ● in /var/log/syslog :
>
> Apr  7 15:50:03 backup slapd[17788]: conn=3 op=4 SRCH
> base="dc=ezplay,dc=tv" scope=2
> filter="(&(objectClass=*)(uid=tester))" Apr  7 15:50:03 backup
> slapd[17788]: conn=3 op=4 SEARCH RESULT tag=101 err=0 text= Apr  7
> 15:50:05 backup slapd[17789]: conn=7 op=2 SRCH base="dc=ezplay,dc=tv"
> scope=2 filter="(&(objectClass=*)(uid=tester))" Apr  7 15:50:05
> backup slapd[17789]: conn=7 op=2 SEARCH RESULT tag=101 err=0 text=
> Apr  7 15:50:07 backup slapd[17788]: conn=4 op=4 SRCH
> base="dc=ezplay,dc=tv" scope=2
> filter="(&(objectClass=*)(uid=tester))" Apr  7 15:50:07 backup
> slapd[17788]: conn=4 op=4 SEARCH RESULT tag=101 err=0 text= Apr  7
> 15:50:09 backup slapd[17789]: conn=5 op=5 SRCH base="dc=ezplay,dc=tv"
> scope=2 filter="(&(objectClass=*)(uid=tester))"
>
> ===============================================================
>
> ● My .htaccess as follow :
>
> AuthName "For Student to login"
> AuthLDAPUrl ldap://192.168.8.8/dc=ezplay,dc=tv?uid?
> AuthType Basic
>
> <Limit GET POST>
> Order deny,allow
> Deny from all
> Allow from all
> require user test
> </Limit>
>
>
>
> ● However, when i execute "ldapsearch" command  , the result as
> follow:
>
> backup:/var/www/admin# ldapsearch -x -h 192.168.8.8 -b
> dc=ezplay,dc=tv uid=tester version: 2
>
> #
> # filter: uid=tester
> # requesting: ALL
> #
>
> # search result
> search: 2
> result: 0 Success
>
> # numResponses: 1
>
>
>
>
>
> i am NO any idea to solve this problem,  and i have been tried to
> find out answer in Maillist........Unfortunately,i didnt got answer
> about my problem....
>
> Please Help me.........
>
>
>
>
> --
> Trust & Unique ...
> axacheng <axanet@ms32.hinet.net>



Reply to: