Creating Local Users and Groups from the CLI
Resolution
Details
Managing users and groups through the CLI can be a time saver when creating multiple users. Here is a list of useful CLI commands for user and group management.
Creating a user:
# set shared local-user-database user testuser
The above command would be very useful when you want to add several users to the firewall at the same time. From the GUI, adding each user one by one will take a lot of time.
Setting the password hash for a user:
# set shared local-user-database user testuser <passwordhash>
Creating a User-Group:
# set shared local-user-database user-group testgroup
Show the user groups:
# show shared local-user-database user-group testgroup
Putting a user in a group:
# set shared local-user-database user-group testgroup user ppatel
Display group information:
# show shared local-user-database user-group testgroup
testgroup {
user ppatel;
}
[edit]
Note: All the above commands need to be run in configuration mode. A commit is also required when all the users have been created and put into groups.
owner: ppatel