Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
kaliuga
Explorer
Jump to solution

Creating an administrator using mgmt_cli

Hi! I am looking for a way to create an admin using mgmt_cli.

I already found the Management API documentation, but I can't find the commands to publish the changes. For example: 

To create an administrator with an api key authentication method:

mgmt_cli add administrator name admin authentication-method api key permissions-profile read only all  expiration-date never --domain System Data

To generate an api key for it:

mgmt_cli add api-key admin-name admin --domain System Data --format json

To enable the API service:

mgmt_cli set api-settings accepted-api-calls-from all ip addresses that can be used for gui clients --domain System Data --format json

and after that:

mgmt_cli -r true --domain MDS set api-settings accepted-api-calls-from "All IP addresses"

api restart

api status

 

Questions:

Is everything right with these commands?

Do I still need to run the publish changes command? If yes, how it looks? I found only show last-published-session and purge-published-sessions.

And do I need to run two commands to enable the API service or just "mgmt_cli -r true ..." is enough?

 

Thank you in advance!

0 Kudos
1 Solution

Accepted Solutions
Tal_Paz-Fridman
Employee
Employee

If you are not using the session ID it should publish automatically right after the command is executed.

So for example from the Check Point Management API Reference guide:

https://sc1.checkpoint.com/documents/latest/APIs/?#cli/add-administrator~v1.9.1%20

 

Using this command should also publish:

mgmt_cli add administrator name "admin" password "secret" must-change-password false email "admin@gmail.com" phone-number "1800-800-800" authentication-method "check point password" permissions-profile "read write all"  --domain 'System Data' --format json

 

 

There is no need to restart the API service. It should run properly by default.

 

View solution in original post

2 Replies
Tal_Paz-Fridman
Employee
Employee

If you are not using the session ID it should publish automatically right after the command is executed.

So for example from the Check Point Management API Reference guide:

https://sc1.checkpoint.com/documents/latest/APIs/?#cli/add-administrator~v1.9.1%20

 

Using this command should also publish:

mgmt_cli add administrator name "admin" password "secret" must-change-password false email "admin@gmail.com" phone-number "1800-800-800" authentication-method "check point password" permissions-profile "read write all"  --domain 'System Data' --format json

 

 

There is no need to restart the API service. It should run properly by default.

 

the_rock
Legend
Legend
0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events