question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Search doesnt work on Linux

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Comments:25 (13 by maintainers)

github_iconTop GitHub Comments

3reactions
gergodrazsdikcommented, Sep 17, 2020

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.

2reactions
v2kirancommented, Sep 18, 2020

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found