Hi,
I am trying to create a script to run the following command to export the list of users with admin privileges to a text file.
I then need to export the file to a remote server via sftp or email.
Please let me know how I can accomplish it.
What I've done so far:
#!/bin/bash
mgmt_cli show administrators --domain 'System Data' details-level "full" | egrep " name:| type:|authentication-method|permissions-profile" > /tmp/Checkpoint-Admin-List.txt
The above command requires authentication, how do I include the username and password to the above command? I did try the -u <username> -p <password> but that did not work.
Do let me know how i can include the sftp/email command lines as well.
Many thanks in advance,
regards,
nibose