Configuration in pandora
Console installation
To register the plugin, from the console, go to the "register plugin" section.
Click on select file.
Select the .pspz2 file containing the plugin.
A message will appear indicating that the plugin has been uploaded successfully.
Once the plugin is registered, we will see it in the plugins section.
If we click on its title we can navigate to the plugin menu.
You can see the plugin parameters in the plugin menu, all of them will appear, the user must configure them according to the use that the plugin is going to give, the only essential ones are the ones that appear in the parameters section as obligatory.
In the section below you can add a value to each macro.
Manual installation
The best way to manage server plugins in Pandora is from "/usr/share/pandora_server/util/plugin" so we will send it by pscp to that path:
Then we will move to the folder where we have put it ("/usr/share/pandora_server/util/plugin" is the recommended one").
Remember: You have to install the dependencies that the python ldap module needs in your system, it is explained in the configuration section.
We move from home with :
cd /usr/share/pandora_server/util/plugin/
We run the plugin to see that it works:
python3 pandora_ldap.py -s <server> -b <binding> -p <password> -a <agent> [--as_agent_plugin] [ -g <group> ] [ --data_dir <data_dir > ]
With as_agent_plugin 1 we will be able to see an XML with the data that will be shown in the console:
If we execute it in the first way, without "as_agent_plugin 1", we will have created an agent with the name we have given it in the -a parameter with all the modules.
Anyway, if you prefer to install it manually from the console, the process would be as follows:
As a server plugin
click in "add":
We put in the name and description of your choice:
We enter as command the path to the plugin, and as parameters the ones we have entered by executing the plugin, the "_field_" fields are macros defined below.
We put for each macro the description of your choice and as value the data of your ldap server.
As agent plugin
We should enable the remote configuration, to enable it we have to open the pandora_agent.conf file:
vim /etc/pandora/pandora_agent.conf
Inside we look for the remote_config line, to enable it we set it to 1.
And after that we restart the agent :
/etc/init.d/pandora_agent_daemon restart
The remote configuration will have been activated, go to the agents menu and click on the remote configuration icon, which is as follows:
Then we go to plugin menu :
We enter the command, click in add:
Example:
python3 /usr/share/pandora_server/util/plugin/pandoraversion_ldap.py -s ldap://localhost.localdomain:389 -b cn=ldapadm,dc=sanchez,dc=com -p redhat -a ldapserver --as_agent_plugin 1
A new plugin will have been created:
Once this is done, we restart the agent:
/etc/init.d/pandora_agent_daemon restart
And if we go to the agent with the remote configuration, the ldap modules will have been created.