Mar-11-2022, 11:39 AM
I want to do ldap search for finding users groups.
I have this. I doesnt totally give me the result that i want but it works. If you have a query that more useful please inform me.
^
SyntaxError: invalid syntax
I have this. I doesnt totally give me the result that i want but it works. If you have a query that more useful please inform me.
ldapsearch -x -H "ldap://192.168.1.240:3268" -D "Administrator@myserver" -w "mypassword" -b "dc=my,dc=server" '(sAMAccountName=user1)'I want to run this command in my python code. I have the code
import os cmd = ' ldapsearch -x -H "ldap://192.168.1.240:3268" -D "Administrator@myserverl" -w "mypassword" -b "dc=my, dc=server" '(sAMAccountName=user1)' ' print(os.system(cmd))It gives me the error
^
SyntaxError: invalid syntax