How To
ForgeRock Identity Platform
Does not apply to Identity Cloud

How do I add multiple attributes with a single ssoadm command in AM (All versions)?

Last updated Apr 13, 2021

The purpose of this article is to provide information on setting multiple attributes with a single ssoadm command in AM. This is useful when you want to add multiple attributes for a single sub-command, for example, set-identity-attrs or set-attr-defs.


1 reader recommends this article

Adding multiple attributes

You can add multiple attributes using a single ssoadm command either by using a data file or by specifying multiple attributes against the -a parameter with a space as the separator.

For example, if you want to run the following ssoadm commands to make session related changes:

AM 7 and later

$ ./ssoadm set-attr-defs -s iPlanetAMSessionService -t dynamic -u uid=amAdmin,ou=People,dc=openam,dc=forgerock,dc=org -f pwd.txt -a iplanet-am-session-max-session-time=150 $ ./ssoadm set-attr-defs -s iPlanetAMSessionService -t dynamic -u uid=amAdmin,ou=People,dc=openam,dc=forgerock,dc=org -f pwd.txt -a iplanet-am-session-max-idle-time=15 $ ./ssoadm set-attr-defs -s iPlanetAMSessionService -t dynamic -u uid=amAdmin,ou=People,dc=openam,dc=forgerock,dc=org -f pwd.txt -a iplanet-am-session-max-caching-time=5

Pre-AM 7

$ ./ssoadm set-attr-defs -s iPlanetAMSessionService -t dynamic -u amadmin -f pwd.txt -a iplanet-am-session-max-session-time=150 $ ./ssoadm set-attr-defs -s iPlanetAMSessionService -t dynamic -u amadmin -f pwd.txt -a iplanet-am-session-max-idle-time=15 $ ./ssoadm set-attr-defs -s iPlanetAMSessionService -t dynamic -u amadmin -f pwd.txt -a iplanet-am-session-max-caching-time=5

You could use one of the following approaches instead of running them separately:

Data file

  1. Create a data file (called DATA_FILE to match the next command) with the following contents: iplanet-am-session-max-session-time=150 iplanet-am-session-max-idle-time=15 iplanet-am-session-max-caching-time=5
  2. Run the following command: $ ./ssoadm set-attr-defs -s iPlanetAMSessionService -t dynamic -u [adminID] -f [passwordfile] -D DATA_FILEreplacing [adminID] and [passwordfile] with appropriate values.

Multiple attributes in one command

Run the following command to change all the attributes at the same time:

$ ./ssoadm set-attr-defs -s iPlanetAMSessionService -t dynamic -u [adminID] -f [passwordfile] -a iplanet-am-session-max-session-time=150 iplanet-am-session-max-idle-time=15 iplanet-am-session-max-caching-time=5

replacing [adminID] and [passwordfile] with appropriate values.

Note

If you want to change multiple attributes for multiple sub-commands, you will need to use the ssoadm do-batch command or a script. This is detailed in: How do I make batch changes using ssoadm in AM (All versions)?

See Also

How do I make batch changes using ssoadm in AM (All versions)?

FAQ: Installing and using ssoadm in AM

Related Training

N/A

Related Issue Tracker IDs

N/A


Copyright and Trademarks Copyright © 2021 ForgeRock, all rights reserved.