Sponsored Content
Operating Systems Linux SuSE Fetch port services from LDAP server Post 302989391 by Sridaran on Thursday 12th of January 2017 02:20:59 AM
Old 01-12-2017
We came to know there is a limitation set on LDAP query and it will not list all the port services configured in LDAP server. So you have to specify the exact port number to get the TCP/UDP port details from LDAP server EX:
#getent services 24678 --> this will search in /etc/services , if its not available then it will search in LDAP and give respective output.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

iPlanet on HP-UX - WANT to auth aganist MS Directory Services/LDAP

I am running iPlanet 6 on HP-UX 11, and presently all users can access the site. There are 6000 users accessing the website from an Windows Network. I would like users to access the site, but would also like to log user ID's in the access log, without prompting users for an ID/Password. Is... (1 Reply)
Discussion started by: shuterj
1 Replies

2. AIX

how to check status of various services and port?

How can i check which service is activated on my AIX Box? how one can check particular port is open or not (like ftp/telnet port)? I dont have admin rights (1 Reply)
Discussion started by: ashish4422
1 Replies

3. Shell Programming and Scripting

To Fetch a File From FTP server

Hi all, I need to download a file from ftp server through application server(UNIX server). Which only has sufficient privileges to connect to ftp server. And from that server( app server) i have to get that downloaded file in to my current UNIX server(working server where i am working). we... (5 Replies)
Discussion started by: dvk121
5 Replies

4. UNIX and Linux Applications

Server migration from samba+ldap to windows server 2003

Hi, i have a server installed samba+openldap (pdc). Need to migration windows server 2003 (active directory) object users, computers. Where you can read how to do it? Or can tell me how to do it? Thanks. P.S. Sorry for bad english (0 Replies)
Discussion started by: ap0st0l
0 Replies

5. Shell Programming and Scripting

How to fetch File from a URL to Unix Server?

Hello All, I wanted to get the software to be fetched from the Service Provide URL to my unix server. I tired using the mget, but resulted in error. Please take a look. $ wget -O V3-0-5-2.Solaris8-SPARC.tar.gz --http-user=hd87es3 --http-passwd=987dnja7 http://beyond.abinitio.com... (3 Replies)
Discussion started by: raghunsi
3 Replies

6. Ubuntu

what port number is used for SSH communication and HTTPS services

I am trying to find out what port number is used for SSH communication and HTTPS services in my Ubuntu OS. Thank you, Crim (1 Reply)
Discussion started by: crimputt
1 Replies

7. Shell Programming and Scripting

Fetch the different data by searching with a same variable from a file in AIX server

Hi, I am trying to fetch the different values in an xml file by searching with the same variable in AIX Server. <name>SharedResources/Shared/JNDI/Username</name> <value>admin</value> <name>SharedResources/Shared/JNDI/Username</name> ... (1 Reply)
Discussion started by: tejastrikez
1 Replies

8. Red Hat

Restart of services if port no is changed in /etc/services in RHEL

I had a doubt if any services need to be restarted if port no in /etc/services in an RHEL setup is changed. For eg, the port no of 443 for SSL may need to be changed. I hope my query is clear whether any services need to be restarted if port no in /etc/services is changed. Please revert with... (10 Replies)
Discussion started by: RHCE
10 Replies

9. HP-UX

How to fetch all running services on HP-UX?

Hi All, I have a requirement to get all the running services on few HP-UX boxes. In Linux systems I am able to do that successfully using: chkconfig --list. However I can't find anything equivalent in HP-UX. If anyone has any pointers on the same then please suggest. Adyan (4 Replies)
Discussion started by: Adyan Faruqi
4 Replies

10. Solaris

LDAP Client not connecting to LDAP server

I have very limited knowledge on LDAP configuration and have been trying fix one issue, but unsuccessful. The server, I am working on, is Solaris-10 zone. sudoers is configured on LDAP (its not on local server). I have access to login directly on server with root, but somehow sudo is not working... (9 Replies)
Discussion started by: solaris_1977
9 Replies
LDAP_OPEN(3)						     Library Functions Manual						      LDAP_OPEN(3)

NAME
ldap_init, ldap_initialize, ldap_open - Initialize the LDAP library and open a connection to an LDAP server LIBRARY
OpenLDAP LDAP (libldap, -lldap) SYNOPSIS
#include <ldap.h> LDAP *ldap_open(host, port) char *host; int port; LDAP *ldap_init(host, port) char *host; int port; int ldap_initialize(ldp, uri) LDAP **ldp; char *uri; #include <ldap_pvt.h> int ldap_init_fd(fd, proto, uri, ldp) ber_socket_t fd; int proto; char *uri; LDAP **ldp; DESCRIPTION
ldap_open() opens a connection to an LDAP server and allocates an LDAP structure which is used to identify the connection and to maintain per-connection information. ldap_init() allocates an LDAP structure but does not open an initial connection. ldap_initialize() allocates an LDAP structure but does not open an initial connection. ldap_init_fd() allocates an LDAP structure using an existing connection on the provided socket. One of these routines must be called before any operations are attempted. ldap_open() takes host, the hostname on which the LDAP server is running, and port, the port number to which to connect. If the default IANA-assigned port of 389 is desired, LDAP_PORT should be specified for port. The host parameter may contain a blank-separated list of hosts to try to connect to, and each host may optionally by of the form host:port. If present, the :port overrides the port parameter to ldap_open(). Upon successfully making a connection to an LDAP server, ldap_open() returns a pointer to an opaque LDAP structure, which should be passed to subsequent calls to ldap_bind(), ldap_search(), etc. Certain fields in the LDAP structure can be set to indicate size limit, time limit, and how aliases are handled during operations; read and write access to those fields must occur by calling ldap_get_option(3) and ldap_set_option(3) respectively, whenever possible. ldap_init() acts just like ldap_open(), but does not open a connection to the LDAP server. The actual connection open will occur when the first operation is attempted. ldap_initialize() acts like ldap_init(), but it returns an integer indicating either success or the failure reason, and it allows to spec- ify details for the connection in the schema portion of the URI. The uri parameter may be a comma- or whitespace-separated list of URIs containing only the schema, the host, and the port fields. Apart from ldap, other (non-standard) recognized values of the schema field are ldaps (LDAP over TLS), ldapi (LDAP over IPC), and cldap (connectionless LDAP). If other fields are present, the behavior is undefined. At this time, ldap_open() and ldap_init() are deprecated in favor of ldap_initialize(), essentially because the latter allows to specify a schema in the URI and it explicitly returns an error code. ldap_init_fd() allows an LDAP structure to be initialized using an already-opened connection. The proto parameter should be one of LDAP_PROTO_TCP, LDAP_PROTO_UDP, or LDAP_PROTO_IPC for a connection using TCP, UDP, or IPC, respectively. The value LDAP_PROTO_EXT may also be specified if user-supplied sockbuf handlers are going to be used. Note that support for UDP is not implemented unless libldap was built with LDAP_CONNECTIONLESS defined. The uri parameter may optionally be provided for informational purposes. Note: the first call into the LDAP library also initializes the global options for the library. As such the first call should be single- threaded or otherwise protected to insure that only one call is active. It is recommended that ldap_get_option() or ldap_set_option() be used in the program's main thread before any additional threads are created. See ldap_get_option(3). ERRORS
If an error occurs, ldap_open() and ldap_init() will return NULL and errno should be set appropriately. ldap_initialize() and ldap_init_fd() will directly return the LDAP code associated to the error (or LDAP_SUCCESS in case of success); errno should be set as well whenever appropriate. SEE ALSO
ldap(3), ldap_bind(3), ldap_get_option(3), ldap_set_option(3), lber-sockbuf(3), errno(3) ACKNOWLEDGEMENTS
OpenLDAP Software is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>. OpenLDAP Software is derived from Uni- versity of Michigan LDAP 3.3 Release. OpenLDAP 2.4.21 2009/12/20 LDAP_OPEN(3)
All times are GMT -4. The time now is 08:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy