search cancel

Running perl script using CLI on Siteminder Policy Server


Article ID: 128931


Updated On:


CA Single Sign On Secure Proxy Server (SiteMinder) CA Single Sign On SOA Security Manager (SiteMinder) CA Single Sign-On


A simple Perl script to print out all the agent names.

#Initialize the Policy Management API use Netegrity::PolicyMgtAPI; $policyapi = Netegrity::PolicyMgtAPI->New(); print "Step 1. Log in the admin and create an API session.\n"; $session = $policyapi->CreateSession("username", "password"); @agents = $session‑>GetAllAgents(); foreach $agent (@agents) { print "Agent Name = " . $agent‑>Name() . "\n"; } and the following have been loaded in my env variables: PERL5LIB=/opt/sm6/siteminder12/CA/CLI/lib/site_perl/5.8.4/sun4-solaris-thread-multi LD_LIBRARY_PATH=/opt/sm6/siteminder12/CA/CLI/lib:/opt/sm6/siteminder12/CA/lib PATH=/usr/bin::/opt/sm6/siteminder12/CA/CLI/bin/

However, when I run the script using the built-in perl: I get the following error: /opt/sm6/siteminder12/CA/CLI/bin/perl Can't load '/opt/sm6/siteminder12/CA/CLI/lib/site_perl/5.8.4/sun4-solaris-thread-multi/auto/Netegrity/PolicyMgtAPI/' for module Netegrity::PolicyMgtAPI: perl: fatal: open failed: No such file or directory at /opt/sm6/siteminder12/CA/CLI/lib/5.8.4/sun4-solaris-thread-multi/ line 68. at line 3 Compilation failed in require at line 3. BEGIN failed--compilation aborted at line 3.


Component: SMAPC


Need to source ca_ps_env.ksh

From the siteminder home directory, run following;

source ca_ps_env.ksh

Additional Information

* Scripting Interface