📄 ldapmodify.1
字号:
.TH LDAPMODIFY 1 "20 August 2001" "OpenLDAP LDVERSION".\" $OpenLDAP: pkg/ldap/doc/man/man1/ldapmodify.1,v 1.7.2.15 2001/08/29 17:29:52 kurt Exp $.\" Copyright 1998-2000 The OpenLDAP Foundation All Rights Reserved..\" Copying restrictions apply. See COPYRIGHT/LICENSE..SH NAMEldapmodify, ldapadd \- LDAP modify entry and LDAP add entry tools.SH SYNOPSIS.B ldapmodify[\c.BR \-a ][\c.BR \-c ][\c.BR \-n ][\c.BR \-v ][\c.BR \-k ][\c.BR \-K ][\c.BR \-M[M] ][\c.BI \-d \ debuglevel\fR][\c.BI \-D \ binddn\fR][\c.BR \-W ][\c.BI \-w \ passwd\fR][\c.BI \-H \ ldapuri\fR][\c.BI \-h \ ldaphost\fR][\c.BI \-p \ ldapport\fR][\c.BI \-P \ 2\fR\||\|\fI3\fR][\c.BR \-O \ security-properties ][\c.BR \-I ][\c.BR \-Q ][\c.BI \-U \ authcid\fR][\c.BR \-x ][\c.BI \-X \ authzid\fR][\c.BI \-Y \ mech\fR][\c.BR \-Z[Z] ][\c.BI \-f \ file\fR].LP.B ldapadd[\c.BR \-c ][\c.BR \-n ][\c.BR \-v ][\c.BR \-k ][\c.BR \-K ][\c.BR \-M[M] ][\c.BI \-d \ debuglevel\fR][\c.BI \-D \ binddn\fR][\c.BR \-W ][\c.BI \-w \ passwd\fR][\c.BI \-h \ ldaphost\fR][\c.BI \-p \ ldapport\fR][\c.BI \-P \ 2\fR\||\|\fI3\fR][\c.BR \-O \ security-properties ][\c.BR \-I ][\c.BR \-Q ][\c.BI \-U \ authcid\fR][\c.BR \-x ][\c.BI \-X \ authzid\fR][\c.BI \-Y \ mech\fR][\c.BR \-Z[Z] ][\c.BI \-f \ file\fR].SH DESCRIPTION.B ldapmodifyis a shell-accessible interface to the.BR ldap_modify (3)and.BR ldap_add (3)library calls..B ldapaddis implemented as a hard link to the ldapmodify tool. When invoked as.B ldapaddthe -a (add new entry) flag is turned on automatically..LP.B ldapmodifyopens a connection to an LDAP server, binds, and modifies or adds entries.The entry information is read from standard input or from \fIfile\fP throughthe use of the -f option..SH OPTIONS.TP.B \-aAdd new entries. The default for.B ldapmodifyis to modify existing entries. If invoked as.BR ldapadd ,this flag is always set..TP.B \-cContinuous operation mode. Errors are reported, but.B ldapmodifywill continue with modifications. The default is to exit afterreporting an error..TP.B \-nShow what would be done, but don't actually modify entries. Useful fordebugging in conjunction with -v..TP.B \-vUse verbose mode, with many diagnostics written to standard output..TP.B \-kUse Kerberos IV authentication instead of simple authentication. It isassumed that you already have a valid ticket granting ticket. You mustcompile with Kerberos support for this option to have any effect..TP.B \-KSame as \-k, but only does step 1 of the Kerberos IV bind. This is usefulwhen connecting to a slapd and there is no x500dsa.hostname principalregistered with your Kerberos Domain Controller(s)..TP.B \-FForce application of all changes regardless of the contents of inputlines that begin with.I replica:(by default, replica: lines are compared against the LDAP server hostand port in use to decide if a replog record should actually be applied)..TP.B \-M[M]Enable manage DSA IT control..B \-MMmakes control critical..TP.BI \-d \ debuglevelSet the LDAP debugging level to \fIdebuglevel\fP..B ldapmodifymust be compiled with LDAP_DEBUG defined for this option to have any effect..TP.BI \-f \ fileRead the entry modification information from \fIfile\fP instead of fromstandard input..TP.B \-x Use simple authentication instead of SASL..TP.BI \-D \ binddnUse the Distinguished Name \fIbinddn\fP to bind to the LDAP directory..TP.B \-WPrompt for simple authentication.This is used instead of specifying the password on the command line..TP.BI \-w \ passwdUse \fIpasswd\fP as the password for simple authentication..TP.BI \-H \ ldapuriSpecify URI(s) referring to the ldap server(s)..TP.BI \-h \ ldaphostSpecify an alternate host on which the ldap server is running.Deprecated in favor of -H..TP.BI \-p \ ldapportSpecify an alternate TCP port where the ldap server is listening.Deprecated in favor of -H..TP.BI \-P \ 2\fR\||\|\fI3Specify the LDAP protocol version to use..TP.BI \-O \ security-propertiesSpecify SASL security properties..TP.B \-IEnable SASL Interactive mode. Always prompt. Default is to promptonly as needed..TP.B \-QEnable SASL Quiet mode. Never prompt..TP.BI \-U \ authcidSpecify the authentication ID for SASL bind. The form of the IDdepends on the actual SASL mechanism used..TP.BI \-X \ authzidSpecify the requested authorization ID for SASL bind..I authzidmust be one of the following formats:.B dn:\c.I <distinguished name>or.B u:\c.I <username>.TP.BI \-Y \ mechSpecify the SASL mechanism to be used for authentication. If it's notspecified, the program will choose the best mechanism the server knows..TP.B \-Z[Z]Issue StartTLS (Transport Layer Security) extended operation. If you use.B \-ZZ\c, the command will require the operation to be successful..SH INPUT FORMATThe contents of \fIfile\fP (or standard input if no \-f flag is given onthe command line) should conform to the format defined in.BR slapd.replog (5),with the exceptions noted below..LPLines that begin with "replica:" are matched against the LDAP server hostand port in use to decide if a particular replog record should be applied.Any other lines that precede the "dn:" line are ignored.The -F flag can be used to force.I ldapmodifyto apply all of the replog changes, regardless of the presence orabsence of any "replica:" lines..LPIf no "changetype:" line is present, the default is "add" if the -aflag is set (or if the program was invoked as.I ldapmodify)and "modify" otherwise..LPIf changetype is "modify" and no "add:", "replace:", or "delete:" linesappear, the default is "replace" for and "add".BR ldapmodify (1)for.BR ldapadd (1)..LPNote that the above exceptions to the.BR slapd.replog (5)format allow.BR ldif (5)entries to be used as input to.I ldapmodifyor.I ldapadd..SH EXAMPLESAssuming that the file.B /tmp/entrymodsexists and has the contents:.LP.nf dn: cn=Modify Me, dc=example, dc=com changetype: modify replace: mail mail: modme@OpenLDAP.org - add: title title: Grand Poobah - add: jpegPhoto jpegPhoto:< file://tmp/modme.jpeg - delete: description -.fi.LPthe command:.LP.nf ldapmodify -r -f /tmp/entrymods.fi.LPwill replace the contents of the "Modify Me" entry's.I mailattribute with the value "modme@example.com", add a.I titleof "Grand Poobah", and the contents of the file "/tmp/modme.jpeg"as a.IR jpegPhoto ,and completely remove the.I descriptionattribute..LPAssuming that the file.B /tmp/newentryexists and has the contents:.LP.nf dn: cn=Barbara Jensen, dc=example, dc=com objectClass: person cn: Barbara Jensen cn: Babs Jensen sn: Jensen title: the world's most famous mythical manager mail: bjensen@example.com uid: bjensen.LPthe command:.LP.nf ldapadd -f /tmp/entrymods.fi.LPwill add a new entry for Babs Jensen, using the values from thefile.B /tmp/newentry..LPAssuming that the file.B /tmp/newentryexists and has the contents:.LP.nf dn: cn=Barbara Jensen, dc=example, dc=com changetype: delete.LPthe command:.LP.nf ldapmodify -f /tmp/entrymods.fi.LPwill remove Babs Jensen's entry..SH DIAGNOSTICSExit status is zero if no errors occur. Errors result in a non-zeroexit status and a diagnostic message being written to standard error..SH "SEE ALSO".BR ldapadd (1),.BR ldapdelete (1),.BR ldapmodrdn (1),.BR ldapsearch (1),.BR ldap.conf (5),.BR ldap (3),.BR ldap_add (3),.BR ldap_delete (3),.BR ldap_modify (3),.BR ldap_modrdn (3),.BR slapd.replog (5).SH BUGSThere is no interactive mode, but there probably should be..SH AUTHORThe OpenLDAP Project <http://www.openldap.org/>.SH ACKNOWLEDGEMENTS.B OpenLDAPis developed and maintained by The OpenLDAP Project (http://www.openldap.org/)..B OpenLDAPis derived from University of Michigan LDAP 3.3 Release.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -