Technical Tip: How to add or modify CLI credentials in bulk on several network devices added to the FortiNAC inventory
| Description | This article describes the need to update the CLI credentials on several devices simultaneously in the FortiNAC inventory. |
| Scope | FortiNAC, FortiNAC-F. |
| Solution | Regularly updating CLI credentials across all devices within the FortiNAC inventory is an essential security and operational practice. These credentials are used by FortiNAC to authenticate, manage, and communicate securely with network devices such as switches, routers, and wireless controllers.
Alternatively, it might be required to update the network devices' CLI credentials. In this case, FortiNAC needs to be updated with the latest credentials for the devices in the inventory to continue performing its tasks.
Reasons for the update:
Procedure for Updating CLI Credentials in FortiNAC via GUI: To update the CLI credentials for multiple network devices in bulk:
Procedure for Updating CLI Credentials in FortiNAC via CLI (NAC-OS only): The same bulk modification of CLI credentials on network devices added to the FortiNAC-F inventory can also be performed from the CLI.
Notes:
Log in to the FortiNAC CLI.
diagnose network device set cli-credential-attribute <user-name> <password> <enable-password> <session-type> (ip <ip> | mac <mac> | dbid <dbid> | device-name <device-name> | group <group> | container-name <container-name> |class-id <class-id> | attribute-name <attribute-name> | all) Sets the CLI credential attribute onto the selected device. <user-name> user name to be set <password> password to be set <enable-password> password to be set <session-type> session type to be set telnet, ssh, ssh2 all select all devices attribute-name <attribute-name> select by device attribute class-id <class-id> select device(s) by class in the range 0-56 container-name <container-name> select device by container name dbid <dbid> select device by database Id device-name <device-name> select device by name group <group> select device(s) by group name ip <ip> select device by IP Address mac <mac> select device by MAC Address
For details, see the CLI Reference Manual guide of FortiNAC v7.4.0+. |

