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

Add user in group by CLI

  • June 30, 2016
  • 7 replies
  • 28230 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

    7 replies

    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>

    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!