Sponsored Content
Top Forums UNIX for Advanced & Expert Users ldapsearch in monitoring script without bind password written in script Post 302558002 by Corona688 on Thursday 22nd of September 2011 01:05:32 PM
Old 09-22-2011
from man ldapsearch:

Code:
-j filename

	   Specify a file containing the password for the bind DN or the pass-
	   word for the SSL client's key database. To  protect	the  password,
	   use this option in scripts and place the password in a secure file.
	   This option is mutually exclusive of the -w and -W options.

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Simple shell script to be written

There are 2 shell script files sh1 and sh2. sh2 contains records such as 01 02 03 on different lines. In sh1, I would like to read each record of sh2 till end of file, concatenate them with a comma(,) and store in a variable. Can somebody please help me with the sh1 script? Thanks in... (2 Replies)
Discussion started by: shsandeep
2 Replies

2. Shell Programming and Scripting

Simple shell script to be written

There are 2 shell script files sh1 and sh2. sh2 contains records such as 01 02 03 on different lines. In sh1, I would like to read each record of sh2 till end of file, concatenate them with a comma(,) and store in a variable. Can somebody please help me with the sh1 script? Thanks in... (6 Replies)
Discussion started by: shsandeep
6 Replies

3. Shell Programming and Scripting

what's the largest shell script you've ever written?

I've just written a test harness using ksh. One of scripts weighed in at 1206 lines. I came across Eric Raymonds 'Art of Unix programming' on line and he advises against excessively large scripts. I am very interested to hear people's opinions on this and any experiences they have had. (2 Replies)
Discussion started by: OFFSIHR
2 Replies

4. UNIX for Dummies Questions & Answers

can a korn shell script be written on HP-UNIX?

Is HP UNIX and Korn different flavours of unix? can a korn shell script be written on HP Unix? (4 Replies)
Discussion started by: soujanya_srk
4 Replies

5. IP Networking

Help Needed regarding Ldapsearch script

Hi guys, I very appreciate for answering to my previous query. I have encountered another problem.I have a perl script to display required networking information like DNS,gateway,etc. to be changed in a remote computer which is to be added to a computing cluster. I need a script which... (0 Replies)
Discussion started by: pranav.mehta3
0 Replies

6. Shell Programming and Scripting

Apply Password to already Written XLS File.

I need to apply password protection to a xls file.I had looked at SpreadSheet::WriteExcel but problem being i dont want to write the contents of file again as the formatting the file would be a pain. Is there way in which i write a entire file in one go , something like this ... (0 Replies)
Discussion started by: dinjo_jo
0 Replies

7. Red Hat

ldapsearch bash script help

Hi there everyone. I'm trying to make a bash script that accepts some arguments ans give's back some info about LDAP users and servers. I have this function : has_group_access(){ result=$(ldapsearch -LLL "cn=${GROUP_NAME}" cn member | cut -d"," -f1 | cut -d":" -f2 | cut -d"=" -f2 | grep... (1 Reply)
Discussion started by: theboogymaster
1 Replies

8. Shell Programming and Scripting

useless line feeds in ldapsearch output. Howto remove with shell script?

Hi $ cat ad.sh ldapsearorg -x -LLL -h sb1131z.testbadbigcorp.org -D "CN=ADMINZZ,OU=AdminRoles,DC=testbadbigcorp,DC=org" -w "UT3w4f57lll--4...4" -b "OU=Test,DC=testbadbigcorp,DC=org" "(&(&(&(&(objectCategory=person)(objectClass=user)(lockoutTime:1.2.840.113556.1.4.804:=4294967295)))))" dn$... (3 Replies)
Discussion started by: slashdotweenie
3 Replies

9. Programming

How could I interact with shell script from webportal written in php?

Hello, I am new on PHP scripting .I have shell scripts which I an running currently from linux server but now I want to make a web portal from where I will run all my scripts but the problem is all my scripts ask for parameters so I am getting confused how could I run my shell script from web... (2 Replies)
Discussion started by: anuragpgtgerman
2 Replies

10. Shell Programming and Scripting

BASH- Hold script until all contents of a file is written

I have to hit a very large database to pull fields of information. I have a script that runs multiple instance of the same query against the data base and writes contents to a file. The script terminates before the file is completely written to confirmed by ps -ef | grep <script name>... (3 Replies)
Discussion started by: popeye
3 Replies
ldapmodrdn(1)							   User Commands						     ldapmodrdn(1)

NAME
ldapmodrdn - ldap modify entry RDN tool SYNOPSIS
ldapmodrdn [-r] [-n] [-v] [-c] [-E] [-H] [-?] [-M] [-R] [-Z] [-V version] [-d debuglevel] [-D bindDN] [-w passwd] [-h ldaphost] [-i locale] [-j filename] [-J [:criticality]] [-k path] [-N certificate] [-O hopLimit] [-P path] [-W password] [-p ldapport] [-o attributename=value] [-f file] [-Y proxyDN] [ dn rdn] DESCRIPTION
ldapmodrdn opens a connection to an LDAP server, binds, and modifies the RDN of entries. The entry information is read from standard input, from file through the use of the -f option, or from the command-line pair dn and rdn. OPTIONS
-c Continuous operation mode. Errors are reported, but ldapmodify continues with modifications. The default is to exit after reporting an error. -D bindDN Use the distinguished name binddn to bind to the directory. -d debuglevel Set the LDAP debugging level. Useful values of debuglevel for ldapmodrdn are: 1 Trace 2 Packets 4 Arguments 32 Filters 128 Access control To request more than one category of debugging information, add the masks. For example, to request trace and filter information, spec- ify a debuglevel of 33. -E Ask server to expose (report) bind identity by means of authentication response control. -f file Read the entry modification information from file instead of from standard input or the command-line. -? Display the usage help text that briefly describes all options. -H Display the usage help text that briefly describes all options. -h ldaphost Specify an alternate host on which the LDAP server is running. -i locale Specify the character set to use for the -f LDIFfile or standard input. The default is the character set specified in the LANG environ- ment variable. You might choose to use this option to perform the conversion from the specified character set to UTF8, thus overriding the LANG setting. -J [:criticality[:value|::b64value|b64value|:fileurl]] Criticality is a boolean value (default is false). -j filename Specify a file containing the password for the bind DN or the password for the SSL client's key database. To protect the password, use this option in scripts and place the password in a secure file. This option is mutually exclusive of the -w and -W options. -k path Specify the path to a directory containing conversion routines. These routines are used if you want to specify a locale that is not supported by default by your directory server. This is for NLS support. -M Manage smart referrals. When they are the target of the operation, modify the entry containing the referral instead of the entry obtained by following the referral. -n Previews modifications, but makes no changes to entries. Useful in conjunction with -v and -d for debugging. -N certificate Specify the certificate name to use for certificate-based client authentication. For example: -N "Directory-Cert". -n Show what would be done, but do not actually change entries. Useful in conjunction with -v for debugging. -o attributename=value For SASL mechanisms and other options such as security properties, mode of operation, authorization ID, authentication ID, and so forth. The different attribute names and their values are as follows: secProp="number" For defining SASL security properties. realm="value" Specifies SASL realm (default is realm=none). authzid="value" Specify the authorization ID name for SASL bind. authid="value" Specify the authentication ID for SASL bind. mech="value" Specifies the various SASL mechanisms. -O hopLimit Specify the maximum number of referral hops to follow while finding an entry to modify. By default, there is no limit. -P path Specify the path and filename of the client's certificate database. For example: -P /home/uid/.netscape/cert7.db When using the command on the same host as the directory server, you can use the server's own certificate database. For example: -P installDir/lapd-serverID/alias/cert7.db Use the -P option alone to specify server authentication only. -p ldapport Specify an alternate TCP port where the secure LAPD server is listening. -R Do not automatically follow referrals returned while searching. -r Remove old RDN values from the entry. By default, old values are kept. -V version Specify the LDAP protocol version number to be used for the delete operation, either 2 or 3. LDAP v3 is the default. Specify LDAP v2 when connecting to servers that do not support v3. -v Use verbose mode, with diagnostics written to standard output. -W password Specify the password for the client's key database given in the -P option. This option is required for certificate-based client authen- tication. Specifying password on the command line has security issues because the password can be seen by others on the system by means of the ps command. Use the -j instead to specify the password from the file. This option is mutually exclusive of -j. -w passwd Use passwd as the password for authentication to the directory. When you use -w passwd to specify the password to be used for authenti- cation, the password is visible to other users of the system by means of the ps command, in script files or in shell history. If you use the ldapmodrdn command without this option, the command will prompt for the password and read it from standard in. When used with- out the -w option, the password will not be visible to other users. -Y proxyid Specify the proxy DN (proxied authorization id) to use for the modify operation, usually in double quotes ("") for the shell. -Z Specify that SSL be used to provide certificate-based client authentication. This option requires the -N and SSL password and any other of the SSL options needed to identify the certificate and the key database. Input Format If the command-line arguments dn and rdn are given, rdn replaces the RDN of the entry specified by the DN, dn. Otherwise, the contents of file (or standard input if the - f option is not specified) must consist of one or more pair of lines: Distinguished Name (DN) Relative Distinguished Name (RDN) Use one or more blank lines to separate each DN/RDN pair. EXAMPLES
The file /tmp/entrymods contains: cn=Modify Me, o=XYZ, c=US cn=The New Me The command: example% ldapmodify -r -f /tmp/entrymods changes the RDN of the "Modify Me" entry from "Modify Me" to "The New Me" and the old cn, "Modify Me" is removed. ATTRIBUTES
See attributes(5) for a description of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Stability Level |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
ldapadd(1), ldapdelete(1), ldapmodify(1), ldapsearch(1), attributes(5) DIAGNOSTICS
Exit status is 0 if no errors occur. Errors result in a non-zero exit status and a diagnostic message being written to standard error. SunOS 5.10 15 Jan 2004 ldapmodrdn(1)
All times are GMT -4. The time now is 01:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy