Search doesnt work on Linux
See original GitHub issueDescribe the bug Search for objects dose not work on linux(ubuntu 18.04).
To Reproduce
add-type -AssemblyName /mnt/c/Users/kiranna/Source/LdapForNet.dll
$cn = [LdapForNet.LdapConnection]::new()
$cn.Connect("ldap://server.example.com:389",[LdapForNet.Native.Native+LdapVersion]::LDAP_VERSION3)
$base = "dc=example,dc=com"
$filter = "(&(objectcategory=person)(name=kiran*))"
$ldapcred = [LdapForNet.LdapCredential]::new()
$ldapcred.UserName = "admin"
$ldapcred.Password = "password"
$ldapcred.Realm = "example.com"
$cn.Bind([LdapForNet.Native.Native+LdapAuthType]::Digest,$ldapcred)
$cn.Search($base,$filter,"Name",[LdapForNet.Native.Native+LdapSearchScope]::LDAP_SCOPE_SUBTREE)
Expected behavior The search function completes showing the returned objects.
Actual behavior The search function seems to get stuck and never returns or times out.
Desktop (please complete the following information):
- OS: Ubuntu 18.04
- Library version :2.7.2
- .NET\core\mono version - netstandard 2.0
- LDAP server : Active Directory
Additional context The search works perfectly fine on windows with the same ldap server its only on linux that its failing. Also the search works with ad lds on linux so something seems to be going wrong specifically with AD.I have also tried changing the ad server but same result. Perhaps I am missing some parameter or setting something incorrectly on linux. Would appreciate an example where it works with AD on linux.
Issue Analytics
- State:
- Created 3 years ago
- Comments:25 (13 by maintainers)
Top Results From Across the Web
simple command "find" not working
The man page for find (on my current Ubuntu install "find (GNU findutils) 4.7.0-git") says that putting the -name first will reduce resource ......
Read more >linux find command is not working properly
The reason for it not working from one directory, but working fine in other directories, is that the * character is used for...
Read more >How To Fix Google Search Not Working On Linux - YouTube
Sometimes Google doesn't work on one of your devices and you don't have any idea why it happens or how to fix it....
Read more >Ubuntu 22.04 GNOME Search Not Working Correctly
After I installed the theme, there is a bug with my GNOME search bar (when you press the SUPER key and start writing)....
Read more ><SOLVED> Files search no longer working
I'm sure I used to be able to search my data drive really easily. But recently, whatever I type in to a search...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had issues with referrals on linux. I found out, that the correct way to disable them on linux is:
connection.SetOption(Native.LdapOption.LDAP_OPT_REFERRALS, IntPtr.Zero);
On windows it was working for me either way.
@flamencist - Yes it did 😃 on linux Ubuntu 18.04 I was waiting to test it on a Mac but I am sure it will work there too.
@gergodrazsdik - thank you for posting the solution.