Need help in Python script to BIND with OID(Oracle Internet Directory) Server - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Need help in Python script to BIND with OID(Oracle Internet Directory) Server (/thread-6599.html) |
Need help in Python script to BIND with OID(Oracle Internet Directory) Server - kiran_j - Nov-30-2017 Hi, I want to write python script to connect/bind to our OID(oracle internet directory) server Server : oraoidvm.dba.com Port : 3060 I tried to write below code, bit getting error: Script : -bash-3.2$ cat test.py #!/usr/bin/python from ldap3 import Connection, Server server = Server( "ldap://oraoidvm.dba.com:3060" ) connection = Connection( server, user="cn=orcladmin", password="welcome1" ) connection.bind() -bash-3.2$ Error: -bash-3.2$ python test.py Traceback (most recent call last): File "test.py", line 5, in <module> connection.bind() File "build/bdist.solaris-2.10-i86pc/egg/ldap3/core/connection.py", line 512, in bind File "build/bdist.solaris-2.10-i86pc/egg/ldap3/strategy/sync.py", line 56, in open File "build/bdist.solaris-2.10-i86pc/egg/ldap3/strategy/base.py", line 141, in open ldap3.core.exceptions.LDAPSocketOpenError: socket connection error while opening: [Errno 128] Network is unreachable Python Version: -bash-3.2$ python --version Python 2.6.4 -bash-3.2$ OS: -bash-3.2$ cat /etc/release Oracle Solaris 10 1/13 s10x_u11wos_24a X86 Copyright © 1983, 2013, Oracle and/or its affiliates. All rights reserved. Assembled 17 January 2013 -bash-3.2$ I am able to telnet: # telnet oraoidvm.dba.com 3060 Trying 192.168.1.150... Connected to oraoidvm.dba.com. Escape character is '^]'. Please help or suggest. Regards, Kiran |