lemonldap-ng-cli1p
Command-line manager for lemonldap::ng web-sso system.
Usage
Usage: lemonldap-ng-cli
[options]
ACTION
[parameters ...]
Available actions:
help :
print
the
full
documentation
info :
get
currentconfiguration
info
update-cache :
force
configuration
cache
to
be
updated
test-email DESTINATION
:
send
a
test
email
get KEY
:
get
values
of
parameters
set KEY
VALUE
:
set
parameter(s)
value(s)
del KEY
:
delete
parameters
addKey KEY
SUBKEY
VALUE
:
add
or
set
a
subkey
in
a
parameter
delKey KEY
SUBKEY
:
delete
subkey
of
a
parameter
addPostVars HOST
URI
KEY
VALUE
:
add
post
vars
for
form
replay
delPostVars HOST
URI
KEY
:
delete
post
vars
for
form
replay
merge FILE
[FILE ...]
:
merge
JSON/YAML
files
with
existing
configuration
save :
export
configuration
to
STDOUT
restore -
:
import
configuration
from
STDIN
restore FILE
:
import
configuration
from
file
rollback :
restore
previous
configuration
Options:
Additional options:
Overview
lemonldap-ng-cli is a command line interface to interact with Lemonldap::NG configuration. It can be used to read or update configuration variables programmatically, or perform global operations on the configuration.
Examples
Get information about current configuration
$ lemonldap-ng-cli info
Update local configuration cache
$ lemonldap-ng-cli update-cache
Send a test email
$ lemonldap-ng-cli test-email [email protected]
Save configuration
$ lemonldap-ng-cli save >conf.json$ lemonldap-ng-cli -cfgNum 19 save >conf-19.json
Restore configuration
$ lemonldap-ng-cli restore conf.json# OR$ lemonldap-ng-cli restore - <conf.json
Cancel the last configuration change
$ lemonldap-ng-cli rollback
Get a configuration parameter value
$ lemonldap-ng-cli get portal domain cookieName
Set some values
$ lemonldap-ng-cli set portal http://auth.e.com/ domain e.com# add or set a key$ lemonldap-ng-cli addKey macro fullname '$givenName." ".$lastName'# without changing the version number$ lemonldap-ng-cli -force 1 -cfgNum 1 set portal http://auth.e.com/ domain e.com# without asking for confirmation$ lemonldap-ng-cli -yes 1 set portal http://auth.e.com/ domain e.com
Arguments
info-
Print configuration metadata, such as number, author, date and log
update-cache-
Update the local configuration cache, this command only affects the server on which it is run
- test-email DESTINATION
-
Sends a test email to the specified DESTINATION, this lets you check your SMTP settings
- get KEY [ KEY ... ]
-
Print the specified KEY from configuration. Multiple keys may be given
- set KEY VALUE [KEY VALUE ...]
-
Set the specified KEY to the specified VALUE. Multiple key-value pairs may be given.
The configuration number is increased once all given key-value pairs have been processesed.
- delete KEY [ KEY ... ]
-
Delete the specified KEY from configuration. Multiple keys can be given.
The configuration number is increased once all keys have been deleted.
- addKey KEY SUBKEY VALUE [KEY SUBKEY VALUE ...]
-
This action can be used to set a sub-key inside a composite configuration key (such as globalStorageOptions, locationRules, etc.)
Multiple key-subkey-value triplets may be given.
The configuration number is increased once all given triplets have been processesed.
- delKey KEY SUBKEY [KEY SUBKEY ...]
-
This action can be used to delete a sub-key from a composite configuration key (such as globalStorageOptions, locationRules, etc.)
Multiple key-subkey pairs may be given.
The configuration number is increased once all given pairs have been processesed.
- addPostVars HOST URI KEY VALUE
-
This action lets you add a new POST var in a form replay configuration.
- delPostVars HOST URI KEY
-
This action lets you delete a new POST var in a form replay configuration.
- merge FILE [FILE ...]
-
This action iterates through the given JSON or YAML files and merges the existing configuration with the keys contained in those files
save-
Dump the entire LemonLDAP::NG configuration to standard output, in JSON format.
The resulting dump can be imported into the manager's interface, or restored with the
restorecommand.
- restore FILE
-
Replace the existing configuration with the content of the provided JSON-formatted FILE. If FILE is the - string, configuration will be read from standard input.
rollback-
This command can be used to cancel the latest configuration change. The previous configuration is fetched from configuration history and saved under a new configuration number.
This action is meant to be a convenient wrapper around
saveandrestore, and does not handle rolling back to an arbitrary version. Rolling back to an arbitrary version can be done manually withsaveandrestore
Options
-
-yes 0|1 -
Skip confirmation prompt (default: 0)
-
-log MESSAGE -
Allows you to set the log message that will be displayed in the manager
-
-safe 0|1 -
The configuration change will be aborted if it contains errors (default: 0)
-
-force 0|1 -
Allows you to force overwriting an existing configuration number (default: 0)
-
-cfgNum NUMBER -
Choose a particular configuration number (default: latest)
-
-sep CHARACTER -
Allows you to define hierarchical separator
-
-iniFile FILE -
Allows you to set an alternative ini file
-
-u USER, --user=USER -
Run the script under the USER system user identity
-
-g GROUP, --group=GROUP -
Run the script under the GROUP system group identity
Bug report
Use OW2 system to report bug or ask for features: <https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues>
Download
Lemonldap::NG is available at <https://release.ow2.org/lemonldap/>
Copyright and license
- Copyright (C) 2016 by Xavier Guimard, <[email protected]>
- Copyright (C) 2016 by Clément Oudot, <[email protected]>
This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Releases
6 releases since Debian 8 (Jessie); the text changed 5 times.
--group since Debian 12 (Bookworm);
--user since Debian 12 (Bookworm);
-cfgNum since Debian 11 (Bullseye);
-force since Debian 11 (Bullseye);
-g since Debian 12 (Bookworm);
-iniFile since Debian 12 (Bookworm);
-log since Debian 11 (Bullseye);
-safe since Debian 11 (Bullseye);
-sep since Debian 12 (Bookworm);
-u since Debian 12 (Bookworm);
-yes since Debian 11 (Bullseye).