1SLAPADD(8C)                                                        SLAPADD(8C)
2
3
4

NAME

6       slapadd - Add entries to a SLAPD database
7

SYNOPSIS

9       /usr/sbin/slapadd  [-b suffix]  [-c]  [-d debug-level]  [-f slapd.conf]
10       [-F confdir]  [-g]  [-j lineno]   [-l ldif-file]   [-n dbnum]   [-o op‐
11       tion[=value]] [-q] [-s] [-S SID] [-u] [-v] [-w]
12

DESCRIPTION

14       Slapadd  is used to add entries specified in LDAP Directory Interchange
15       Format (LDIF) to a slapd(8) database.  It opens the given database  de‐
16       termined  by the database number or suffix and adds entries correspond‐
17       ing to the provided LDIF to the database.  Databases configured as sub‐
18       ordinate  of  this  one  are also updated, unless -g is specified.  The
19       LDIF input is read from standard input or the specified file.
20
21       All files eventually created by slapadd will  belong  to  the  identity
22       slapadd  is  run  as, so make sure you either run slapadd with the same
23       identity slapd(8) will be run as (see option -u in slapd(8)), or change
24       file ownership before running slapd(8).
25
26       Note: slapadd will also perform the relevant indexing whilst adding the
27       database if any  are  configured.  For  specific  details,  please  see
28       slapindex(8).
29

OPTIONS

31       -b suffix
32              Use  the specified suffix to determine which database to add en‐
33              tries to. By default, the first database that supports  the  re‐
34              quested  operation is used. The -b cannot be used in conjunction
35              with the -n option.
36
37       -c     enable continue (ignore errors) mode.
38
39       -d debug-level
40              enable debugging messages as defined  by  the  specified  debug-
41              level; see slapd(8) for details.
42
43       -f slapd.conf
44              specify an alternative slapd.conf(5) file.
45
46       -F confdir
47              specify  a  config  directory.  If both -f and -F are specified,
48              the config file will be read and converted to  config  directory
49              format  and  written to the specified directory.  If neither op‐
50              tion is specified, an attempt to read the default config  direc‐
51              tory  will be made before trying to use the default config file.
52              If a valid config directory exists then the default config  file
53              is  ignored.  If  dry-run  mode is also specified, no conversion
54              will occur.
55
56       -g     disable subordinate gluing.  Only the specified database will be
57              processed, and not its glued subordinates (if any).
58
59       -j lineno
60              Jump  to  the specified line number in the LDIF file before pro‐
61              cessing any entries. This allows a load that was aborted due  to
62              errors in the input LDIF to be resumed after the errors are cor‐
63              rected.
64
65       -l ldif-file
66              Read LDIF from the specified file instead of standard input.
67
68       -n dbnum
69              Add entries to the dbnum-th database listed in the configuration
70              file.   The -n cannot be used in conjunction with the -b option.
71              To populate the config database slapd-config(5), use -n 0 as  it
72              is  always  the  first database. It must physically exist on the
73              filesystem prior to this, however.
74
75       -o option[=value]
76              Specify an option with a(n optional)  value.   Possible  generic
77              options/values are:
78
79                     syslog=<subsystems>  (see `-s' in slapd(8))
80                     syslog-level=<level> (see `-S' in slapd(8))
81                     syslog-user=<user>   (see `-l' in slapd(8))
82
83                     schema-check={yes|no}
84                     value-check={yes|no}
85
86              The schema-check option toggles schema checking (default on);
87              the value-check option toggles value checking (default off).
88              The latter is incompatible with -q.
89
90       -q     enable quick (fewer integrity checks) mode.  Does fewer consistency checks
91              on the input data, and no consistency checks when writing the database.
92              Improves the load time but if any errors or interruptions occur the resulting
93              database will be unusable.
94
95       -s     disable schema checking.  This option is intended to be used when loading
96              databases containing special objects, such as fractional objects on a
97              partial consumer.  Loading normal objects which do not conform to
98              schema may result in unexpected and ill behavior.
99
100       -S SID Server ID to use in generated entryCSN.  Also used for contextCSN
101              if -w is set as well.  Defaults to 0.
102
103       -u     enable dry-run (don't write to backend) mode.
104
105       -v     enable verbose mode.
106
107       -w     write syncrepl context information.
108              After all entries are added, the contextCSN
109              will be updated with the greatest CSN in the database.
110

LIMITATIONS

112       Your  slapd(8) should not be running when you do this to ensure consis‐
113       tency of the database.
114
115       slapadd may not provide naming or schema checks.  It  is  advisable  to
116       use ldapadd(1) when adding new entries into an existing directory.
117

EXAMPLES

119       To  import  the entries specified in file ldif into your slapd(8) data‐
120       base give the command:
121
122            /usr/sbin/slapadd -l ldif
123

SEE ALSO

125       ldap(3), ldif(5), slapcat(8), slapindex(8), slapmodify(8),  ldapadd(1),
126       slapd(8)
127
128       "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
129

ACKNOWLEDGEMENTS

131       OpenLDAP  Software  is developed and maintained by The OpenLDAP Project
132       <http://www.openldap.org/>.  OpenLDAP Software is derived from the Uni‐
133       versity of Michigan LDAP 3.3 Release.
134
135
136
137OpenLDAP 2.6.6                    2023/07/31                       SLAPADD(8C)
Impressum