- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Enhanced Security Measures in Place: To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.
11-23-2021 07:05 AM
Hi,
I'm struggling a bit to find an efficient way to create an admin role using the cli.
Let's say I want to create an admin role and grant it all rights that can be found in the "Web UI" tab when using the web interface.
Is there a command that basically does this?
set shared admin-role webadmin role device webui ALL
Right now the only way that I can see is a huge list of commands:
set shared admin-role webadmin role device webui acc
set shared admin-role webadmin role device webui dashboard
set shared admin-role webadmin role device webui monitor
set shared admin-role webadmin role device webui monitor logs
set shared admin-role webadmin role device webui monitor logs traffic enable
(repeat last line for all the items under logs)
(and for each and every other item in webui, it just keeps going...)
Maybe I'm overlooking something?
11-25-2021 06:03 AM - edited 11-25-2021 06:05 AM
Hi @mlanterm ,
Just creating an admin-role is cli is easy:
admin@PA-VM# set shared admin-role adminxdr role device webui
However, when you create your admin-role like this, all the roles will be disabled by default as opposed to when you create the admin-role through the GUI. If you create an admin-role through the GUI, all the roles are enabled by default (which is kinda inconsistent ... maybe check with support if this is considered a bug or a feature request 😉).
Below is en example of a CLI created admin-role ... all the roles are disabled by default.
You could create a script and copy/paste the bulk of lines by enabling scripting mode
username@hostname> set cli scripting-mode on
Hope this helps,
-Kiwi
11-25-2021 08:14 AM
You can try the below link to get the best practice configuration from GitHub for both FW and Panorama.
07-18-2022 11:40 PM
Did you find a way other than scripting 80+ lines to enable all?
07-19-2022 12:45 AM
No, I'm afraid not. We sort-of worked around it by using Radius with domain accounts, and gave up on separate types of admins. So we have the local admin account as a break-glass emergency account, and for daily use it's domain accounts where Radius sends the "superuser" attribute along. In this setup there's no need to define custom admin roles.
Which is okay in our small team, where "yay everyone is a superuser" is "fine"...
But I still feel it's very counter-intuitive to script an admin role without wildcards and have it work the opposite way as the GUI.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!