Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Shell Script to Direct a Unix, Linux or Macintosh Client to a New NS Server

Created: 19 Jun 2008 • Updated: 19 Jun 2008
dougj's picture
0 0 Votes
Login to vote

It's really not that difficult to direct a Unix, Linux or Macintosh client to a different NS server. Simply change the 'Server-1' value in the client.conf, restart the agent and voila! The following shell script will even do it all for you!

The 'Server-1' value in the client.conf file is used by the agent to determine which NS server to communicate with. Changing this value and restarting the agent process will cause the agent to communicate to the new server. If the value specified in 'Server-1' is not a valid NS server, communication will obviously fail.

The same result can be achieved by

  1. Manually changing the 'Server-1' value in the client.conf file and restarting the agent process;
  2. By stopping the agent service and running 'aex-configure' with a config.xml file containing a new 'NSName' value; or
  3. By running 'aex-configure -iconfigure' and specifying a new NS server name at the first prompt.

This script displays the before value of the 'Server-1' name/value pair in the client.conf file, modifies the value as specified via a command line parameter, restarts the agent process and displays the after value. The process is not complete until the agent process restarts. It may be helpful to manually run 'aex-sendbasicinv' and 'aex-refreshpolicies'.

After downloading this script, run chmod to make it executeable, e.g., "chmod 755 setnsserver,sh" or "chmod u+x setnsserver.sh". The script will not run if it is not executable.

This script requires the use of root privileges or 'sudo' to modify the client.conf file and to restart the agent. If the agent restart process fails or stalls, enter 'ctrl-c' to break the currently running process and rerun the shell script using sudo, e.g., "sudo ./setnsserver.sh".

License: Altiris EULA
By downloading this software, you agree to the terms and conditions in the Altiris End User License Agreement
Support: User-contributed tools on the Juice are not supported by Altiris Technical Support. If you have questions about a tool, please communicate directly with the author by visiting their profile page and clicking the 'contact' tab.