Users can not only be managed using the web interface, but can also be created using Cacti CLI scripts. In Cacti version 1.x, the only script that exists is one which copies an existing user in order to create a new one out of it. An equivalent to the Batch Copy functionality is not available for the command line interface.
Let's assume that you need to add a large amount of users to your Cacti system. You have two options for doing so:
- Use the web-based user management page to create each user
- Use the copy functionality to copy an existing user as a new user
Both options involve quite a few manual steps.
To reduce the manual work needed to create a large group of users within Cacti, you are going to create a small PHP-based script that takes a list of users as input and creates the users based on a template user within Cacti.
First, create a file called users_list.txt
with the following content:
user1;User Name1 user2;User Name2 user3...