Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
LinkM
New Contributor

Script in CLI to Validate Credentials for all interfaces

Hi all!

is there a way in the FortiNAC CLI to validate the credentials of every interface rather than having to manually click Validate Credentials from the GUI for each individual switch?

 

LinkM_0-1651758780580.png

 

 

3 REPLIES 3
GDiFi
Staff
Staff

I think it depends on what credentials you want to test.  If you just want to check snmp you can run the following:

 

Device -all -testsnmp

This will show you a list of failed items and then a total SNMP count at the bottom:

Device SNMP test counts: Succeeded = 3, Failed = 5

 

khoffman
Staff
Staff

From the FortiNAC CLI you could search the output.master log for "failed to connect".  Failed to connect will print anytime that FortiNAC is unable to connect to a network device via CLI credentials. 

grep -i "failed to connect" /bsc/logs/output.master | awk '{print $14}' | sort | uniq


Kyle Hoffman
AEK
SuperUser
SuperUser

If you mean SSH, you can test your password with ssh client from FNAC CLI.

AEK
AEK
Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors