Skip to main content
Error403
New Member
June 30, 2016
Question

Add user in group by CLI

  • June 30, 2016
  • 1 reply
  • 28200 views

Hello ! I have to create a lot of users for VPN SSL portals. I want to script the creation of this users. No difficulty to create account. But, how can I add an account to a user-groups by CLI ? In advance, thank's for your help ! :) Thierry

    1 reply

    ede_pfau
    SuperUser
    SuperUser
    June 30, 2016

    A while ago I've posted a batch command file (Windows) for creating a command file from a list of IPs. Maybe this can help: [link]https://forum.fortinet.com/tm.aspx?m=102532[/link]

    It shouldn't be too difficult to adapt this to creating local users and user groups. Note that there is a limit for the number of users per group (Maximum Values matrix).

     

    To get the correct syntax, create a backup textfile and search for "usergrp".

    Error403
    Error403Author
    New Member
    July 1, 2016

    Thank you for your help ede_pfau. I already use python to generate all my commands line. Note : my request concerns local users only.

    Error403
    Error403Author
    New Member
    July 1, 2016

    Hi ! Problem solved : # config user group # edit <group_name> # set member <member_name>