1LEMONLDAP-NG-CLI(1)   User Contributed Perl Documentation  LEMONLDAP-NG-CLI(1)
2
3
4

NAME

6       lemonldap-ng-cli - Command-line manager for Lemonldap::NG web-SSO
7       system.
8

DESCRIPTION

10       lemonldap-ng-cli is a command line interface to interact with
11       Lemonldap::NG configuration. It can be used to read or update
12       configuration variables programmatically, or perform global operations
13       on the configuration.
14

SYNOPSIS

16       Usage: lemonldap-ng-cli [options] ACTION [parameters ...]
17
18       Available actions:
19
20        help                            : print the full documentation
21        info                            : get currentconfiguration info
22        update-cache                    : force configuration cache to be updated
23        test-email DESTINATION          : send a test email
24        get KEY                         : get values of parameters
25        set KEY VALUE                   : set parameter(s) value(s)
26        del KEY                         : delete parameters
27        addKey KEY SUBKEY VALUE         : add or set a subkey in a parameter
28        delKey KEY SUBKEY               : delete subkey of a parameter
29        addPostVars HOST URI KEY VALUE  : add post vars for form replay
30        delPostVars HOST URI KEY        : delete post vars for form replay
31        merge FILE [FILE ...]           : merge JSON/YAML files with existing configuration
32        save                            : export configuration to STDOUT
33        restore -                       : import configuration from STDIN
34        restore FILE                    : import configuration from file
35        rollback                        : restore previous configuration
36
37       Options:
38
39        -yes 0|1                     : accept confirmation prompt automatically
40        -log msg                     : set configuration log message
41        -safe 0|1                    : fail in case the requested configuration is invalid
42        -force 0|1                   : allow overwrite of existing config number
43        -cfgNum NUM                  : set new configuration number (requires -force 1)
44        -sep CHAR                    : separator of hierarchical values (by default: /)
45        -iniFile FILE                : path to an alternate lemonldap-ng.ini file
46
47       Additional options:
48
49        --user=USER    : change user running the script
50        --group=GROUP  : change group running the script
51

EXAMPLES

53       Get information about current configuration
54
55         $ lemonldap-ng-cli info
56
57       Update local configuration cache
58
59         $ lemonldap-ng-cli update-cache
60
61       Send a test email
62
63         $ lemonldap-ng-cli test-email dwho@badwolf.org
64
65       Save configuration
66
67         $ lemonldap-ng-cli save >conf.json
68         $ lemonldap-ng-cli -cfgNum 19 save >conf-19.json
69
70       Restore configuration
71
72         $ lemonldap-ng-cli restore conf.json
73         # OR
74         $ lemonldap-ng-cli restore - <conf.json
75
76       Cancel the last configuration change
77
78         $ lemonldap-ng-cli rollback
79
80       Get a configuration parameter value
81
82         $ lemonldap-ng-cli get portal domain cookieName
83
84       Set some values
85
86         $ lemonldap-ng-cli set portal http://auth.e.com/ domain e.com
87         # add or set a key
88         $ lemonldap-ng-cli addKey macro fullname '$givenName." ".$lastName'
89
90         # without changing the version number
91         $ lemonldap-ng-cli -force 1 -cfgNum 1 set portal http://auth.e.com/ domain e.com
92
93         # without asking for confirmation
94         $ lemonldap-ng-cli -yes 1 set portal http://auth.e.com/ domain e.com
95

ARGUMENTS

97       info
98           Print configuration metadata, such as number, author, date and log
99
100       update-cache
101           Update the local configuration cache, this command only affects the
102           server on which it is run
103
104       test-email DESTINATION
105           Sends a test email to the specified DESTINATION, this lets you
106           check your SMTP settings
107
108       get KEY [ KEY ... ]
109           Print the specified KEY from configuration. Multiple keys may be
110           given
111
112       set KEY VALUE [KEY VALUE ...]
113           Set the specified KEY to the specified VALUE. Multiple key-value
114           pairs may be given.
115
116           The configuration number is increased once all given key-value
117           pairs have been processesed.
118
119       delete KEY [ KEY ... ]
120           Delete the specified KEY from configuration. Multiple keys can be
121           given.
122
123           The configuration number is increased once all keys have been
124           deleted.
125
126       addKey KEY SUBKEY VALUE [KEY SUBKEY VALUE ...]
127           This action can be used to set a sub-key inside a composite
128           configuration key (such as globalStorageOptions, locationRules,
129           etc.)
130
131           Multiple key-subkey-value triplets may be given.
132
133           The configuration number is increased once all given triplets have
134           been processesed.
135
136       delKey KEY SUBKEY [KEY SUBKEY ...]
137           This action can be used to delete a sub-key from a composite
138           configuration key (such as globalStorageOptions, locationRules,
139           etc.)
140
141           Multiple key-subkey pairs may be given.
142
143           The configuration number is increased once all given pairs have
144           been processesed.
145
146       addPostVars HOST URI KEY VALUE
147           This action lets you add a new POST var in a form replay
148           configuration.
149
150       delPostVars HOST URI KEY
151           This action lets you delete a new POST var in a form replay
152           configuration.
153
154       merge FILE [FILE ...]
155           This action iterates through the given JSON or YAML files and
156           merges the existing configuration with the keys contained in those
157           files
158
159       save
160           Dump the entire LemonLDAP::NG configuration to standard output, in
161           JSON format.
162
163           The resulting dump can be imported into the manager's interface, or
164           restored with the restore command.
165
166       restore FILE
167           Replace the existing configuration with the content of the provided
168           JSON-formatted FILE. If FILE is the - string, configuration will be
169           read from standard input.
170
171       rollback
172           This command can be used to cancel the latest configuration change.
173           The previous configuration is fetched from configuration history
174           and saved under a new configuration number.
175
176           This action is meant to be a convenient wrapper around save and
177           restore, and does not handle rolling back to an arbitrary version.
178           Rolling back to an arbitrary version can be done manually with save
179           and restore
180

OPTIONS

182       -yes 0|1
183           Skip confirmation prompt (default: 0)
184
185       -log MESSAGE
186           Allows you to set the log message that will be displayed in the
187           manager
188
189       -safe 0|1
190           The configuration change will be aborted if it contains errors
191           (default: 0)
192
193       -force 0|1
194           Allows you to force overwriting an existing configuration number
195           (default: 0)
196
197       -cfgNum NUMBER
198           Choose a particular configuration number (default: latest)
199
200       -sep CHARACTER
201           Allows you to define hierarchical separator
202
203       -iniFile FILE
204           Allows you to set an alternative ini file
205
206       -u USER, --user=USER
207           Run the script under the USER system user identity
208
209       -g GROUP, --group=GROUP
210           Run the script under the GROUP system group identity
211

SEE ALSO

213       Lemonldap::NG::Manager::Cli, Lemonldap::NG::Common::Cli
214       <http://lemonldap-ng.org/>
215

AUTHORS

217       Clement Oudot, <clement@oodo.net>
218       Xavier Guimard, <yadd@debian.org>
219       Maxime Besson, <maxime.besson@worteks.com>
220       Christophe Maudoux, <chrmdx@gmail.com>
221

BUG REPORT

223       Use OW2 system to report bug or ask for features:
224       <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues>
225

DOWNLOAD

227       Lemonldap::NG is available at <https://release.ow2.org/lemonldap/>
228
230       Copyright (C) 2016 by Xavier Guimard, <x.guimard@free.fr>
231       Copyright (C) 2016 by Clément Oudot, <clem.oudot@gmail.com>
232
233       This library is free software; you can redistribute it and/or modify it
234       under the terms of the GNU General Public License as published by the
235       Free Software Foundation; either version 2, or (at your option) any
236       later version.
237
238       This program is distributed in the hope that it will be useful, but
239       WITHOUT ANY WARRANTY; without even the implied warranty of
240       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
241       General Public License for more details.
242
243       You should have received a copy of the GNU General Public License along
244       with this program.  If not, see <http://www.gnu.org/licenses/>.
245
246
247
248perl v5.38.0                      2023-11-14               LEMONLDAP-NG-CLI(1)
Impressum