Unsolved

This post is more than 5 years old

1539

June 28th, 2007 07:00

Adding multiple Networker Clients using Solaris

Entereing in clients one-by-one is very time consuming, especially if you need to add 100+. Is there script that I can run in Solaris that would pull the names from a listfile and put them in Networker (they are all the same schedule, policies, group)

Any help would be greatly appreciated

4 Operator

 • 

14.3K Posts

June 28th, 2007 07:00

put inside create type for NSR client and name, schedule and group separated by ;

June 28th, 2007 07:00

Would:

nsradmin create -i nameoflistfile -s -g

work?

4 Operator

 • 

14.3K Posts

June 28th, 2007 07:00

You can do that with nsradmin command.

June 28th, 2007 07:00

I get as far as "nsradmin -i nameoflistfile" but that's about it.

The documentation isn't very clear on where to direct the output of the listfile

June 28th, 2007 08:00

Or is this better?

create type: -i ; group: ; schedule: ; policy

4 Operator

 • 

14.3K Posts

June 28th, 2007 08:00

AFAIK nsradmin doesn't have -g switch.

20 Posts

June 28th, 2007 11:00

Here:

#!/usr/bin/bash
[ $# -lt 1 ] && exit
host=$1

sched=

/usr/sbin/nsradmin -i - <
create type:NSR client;
name:$host;
schedule:$sched;
browse policy: TwoWeeks;
retention policy: TwoWeeks;
directive: Unix with compression directives;
group: ;
TXT

You can also modify this script and make it read hostnames from a file and loop until it adds each client. Obviously, policies and stuff are modifieable to your preferences

June 28th, 2007 11:00

Thank you very much. You both have been very helpful!
No Events found!

Top