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

Export forti token users in fortigate

how do i export the forti token users list in my fortigate?

i have about 180 users in the list

3 REPLIES 3
kcheng
Staff & Editor
Staff & Editor

Hi @yeowkm99 

 

Unfortunately, it would not be possible to export FortiToken user list. You can either obtain the respective from the configuration file, or copy the respective information in the GUI.

Cheers,
Kayzie Cheng

If you have found a solution, please like and accept it to make it easily accessible for others.
rosatechnocrat
Contributor II

Dear Yeowkm99,

There is no direct option to export the users. You can use below methods: 

 

1. manually copy and paste them from the config ( in CLI show)
2. manually copy and paste one by one from the GUI 

Easiest way is the below

-------------------------
3. run the command on the CLI to check the list and copy+paste it manually:

# show | grep -f two-factor

Rosa Technocrat --

Also on YouTube---

Please do Subscribe
Rosa Technocrat --Also on YouTube---Please do Subscribe
Duna
New Contributor

You can use linux and small scripting :)

###### Fortigate: ######

ssh from linux

ssh <fortigate> | tee temp-output.txt

 

config system console

    set output standard

end

 

show full-configuration user local

 

config system console

    set output more

end

 

###### Linux: ######

cat temp-output.txt | egrep 'edit|status|type|two-factor|FTK|mail' | sed 's/set//;s/\r//g' > user-list-tokens.txt

echo "USER;STATUS;TYPE;2FACTOR METHOD;DEVICE;;EMAIL" > user-list-tokens.csv


cat user-list-tokens.txt |tr -d '\n' | sed 's/edit/\n/g;s/status/;status/g;s/type/;type/g;s/two-factor fortitoken/;two-factor fortitoken/g;s/two-factor email/;two-factor email;/g;s/fortitoken "FT/;FT/g;s/email-to/;email-to;/g;s/two-factor disable/;two-factor disable;/g' >> user-list-tokens.csv



Import csv to excel sheet
Excel formulas:

Number of  users using  fortitoken auth

=COUNTIF(user_list_tokens[2FACTOR METHOD];"*fortitoken*")

Number of users using  email token

=COUNTIF(user_list_tokens[2FACTOR METHOD];"*email*")

Number of users without  MFA

=COUNTIFS(user_list_tokens[2FACTOR METHOD];"*disable*";user_list_tokens[STATUS];"*enable*")

Announcements
Check out our Community Chatter Blog! Click here to get involved
Labels
Top Kudoed Authors