Sponsored Content
Top Forums Shell Programming and Scripting Useradd on 200 servers from one server. Post 302899619 by jlliagre on Wednesday 30th of April 2014 11:23:11 AM
Old 04-30-2014
Quote:
Originally Posted by nixhead
I have a list of around 250 machines(IPs).

I have few lines of task on each machine like adding users.
While this won't help for all tasks you might want to achieve, you should consider some centralized administrative repository for user management, like NIS or LDAP. Adding or modifying user's account would then need to be done just once. Not to mention password synchronization.
This User Gave Thanks to jlliagre For This Post:
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

win 200 server + Redhat 9 + FreeBSD 5.1 ?

hi all : i am new to unix and linux world , my experience is near zero, so i am seeking your help to maintain a learning environment to try to catch up with linux and unix in the same time , furthermore win 2000 server is a must for my current job , so what do u think , can this triple boot... (1 Reply)
Discussion started by: behmoth
1 Replies

2. Solaris

Booting Up Servers from the Terminal Server.

All, I have a problem with booting up of servers. I am involved in application programming(Perl/Shell), but don't have much hardware knowledge about the Sun Solaris Server's we use. Our Development Servers are located at a remote place from the Development Centre. Every time there is a Power... (1 Reply)
Discussion started by: rahulrathod
1 Replies

3. Shell Programming and Scripting

scp between 2 servers - invoked at 3rd server

I have a couple of servers that can't see each other and need to copy files from one to the other. I try to invoke scp from a 3rd server that can see both servers - get error msgs that are cryptic. from server C I can do scp user@serverA:~/file . scp file user@serverB:~ but if I try to... (2 Replies)
Discussion started by: bigjohn-nj
2 Replies

4. AIX

Servers still querying old DNS server?

Hello, I've created new DNS servers and changed all of the clients /etc/resolv.conf to point to them, but when I check the old DNS logs, I see that the clients are still querying it. Does anybody know why? thanks, (2 Replies)
Discussion started by: ctcuser
2 Replies

5. Shell Programming and Scripting

Executing certain commands on different servers from one server only

hi I wish to fire certain set of commands on different servers using single script on one of the server. The problem is that these servers only allow ssh session. telnet to these systems is blocked. Is there any way i can do this as rsh does not works. Regards Rochit (7 Replies)
Discussion started by: rochitsharma
7 Replies

6. UNIX for Dummies Questions & Answers

Ssh not working to one server from any of the servers

Hello, I tried ssh in debug mode and below is the debug snippet.ssh to a host is not working from any of the hosts No credentials cache found debug1: Miscellaneous failure No credentials cache found debug1: Next authentication method: publickey debug1: Offering RSA public key:... (7 Replies)
Discussion started by: Vishal_dba
7 Replies

7. Solaris

Solaris 11 AI Server Backup existing servers?

Hey Guys i've got a question about the AI Server. Is there any possibility to backup existing servers to reinstall them automaticly by using the AI Server? Regards Marcus (3 Replies)
Discussion started by: Marcusg562
3 Replies

8. UNIX for Advanced & Expert Users

Scripting in one server to apply other servers?

Hey everyone, I have got 100 different servers(all linux and same version).One of them admin server can reach to others and their structures are same.For example I want to change OS dates and weblogic(java dates) for the timezone project.But I do not want to deal with each one separately.I want... (10 Replies)
Discussion started by: daggerphobia_
10 Replies
dsh(1)							      Dancer Tools reference							    dsh(1)

NAME
dsh - Distributed shell, or dancer's shell SYNOPSIS
dsh [-m machinename | -a | -g groupname] [-r remoteshellname] [-c | -w | -i | -F forklimit ] -- commandline DESCRIPTION
dsh executes command remotely on several different machines at the same time. An utility to effectively do a for a in $(seq 1 10); do rsh $a command; done in bourne shell. OPTIONS
The options available are as follows. --verbose | -v Give verbose output of the execution process. --quiet | -q Makes output quieter. --machine | -m [machinename[,machinename]*] Adds machinename to the list of machines that the command is exeuted. The syntax of machinename allows username@machinename where remote shell is invoked with the option to make it of username. From version 0.21.4, it is possible to specify in the format of username@machinename,username@machinename,username@machinename so that multiple hosts can be specified with comma-delimited values. --all | -a Add all machines found in /etc/dsh/machines.list to the list of machines that the specified command is executed. --group groupname | -g groupname Add all machines found in /etc/dsh/group/groupname to the list of machines that the specified command is executed. If groupname is on the form @netgroup then the machines in the given netgroup is used to specify the list of machines to execute on. --file machinefile | -f machinefile Add all machines found in the specified file to the list of machines that the specified command is executed. The file should list one machine specification per line (with the same syntax as the machinename argument). Lines starting with "#" are ignored. From version 0.21.4, Specifying the same machine several times using any of the machine specification options will result in multi- ple invocations merged into one. --remoteshell shellname | -r shellname Execute remote shell shellname as the remote shell. Usually any of "rsh", "remsh" or "ssh" are available --remoteshellopt rshoption | -o rshoption Add one option rshoption to the list of options passed on to the remote shell. --help | -h Output help message and exits. --wait-shell | -w Executes on each machine and waits for the execution finishing before moving on to the next machine. --concurrent-shell | -c Executes shell concurrently. --show-machine-names | -M Prepends machine names on the standard output. Useful to be used in conjunction with the --concurrent-shell option so that the out- put is slightly more parsable. --hide-machine-names | -H Do not prepend machine names on the standard output. --duplicate-input | -i Duplicates the input to dsh process to individual process that are remotely invoked. Needs to have --concurrent-shell set. Due to limitations in current implementation, it is only useful for running shell. Terminate the shell session with ctrl-D. --bufsize | -b [buffer-size in bytes] Sets the buffer size used in replicating input for --duplicate-input option. --version | -V Outputs version information and exits. --num-topology | -N Changes the current topology from 1. 1 is the default behavior of spawning the shell from one node to every node. Changing the num- ber to a value greater than 2 would result in dsh being spawned on other machines as well. --forklimit | -F fork limit Similar to -c with a limit on the number of simultaneous connections. dsh will wait before creating new connection if the limit is reached. Useful when the number of nodes to be accessed is going somewhere above 200, and using -N option is not possible. EXIT STATUS
The first non-zero exit code of child processes is returned, or zero if none returned non-zero exit code. 1 if error is found in command-line specifications. 2 if signal is received from child processes. EXAMPLES
dsh -a w Shows list of users logged in on all workstations. dsh -r ssh -a -- w Shows list of users logged in on all workstations, and use ssh command to connect. (It should be of note that when using ssh, ssh- agent is handy.) dsh -r ssh -m node1 -m node2 -c -- 'echo $HOSTNAME $(cat/proc/loadavg )' Shows the load average of machines node1 and node2. FILES
/etc/dsh/machines.list | $(HOME)/.dsh/machines.list List of machine names to be used for when -a command-line option is specified. /etc/dsh/group/groupname | $(HOME)/.dsh/group/groupname List of machine names to be used for when -g groupname command-line option is specified. /etc/dsh/dsh.conf | $(HOME)/.dsh/dsh.conf Configuration file containing the day-to-day default. BUGS
There should be a dcp for copying files to remote systems. Configuration files should really be able to do something more than it does now. AUTHOR
Junichi Uekawa (dancer@debian.org) Upstream page is available at http://www.netfort.gr.jp/~dancer/software/dsh.html SEE ALSO
rsh(1), ssh(1), remsh(1), dsh.conf(5) Debian-Beowulf/Dancer 2007 Aug 15 dsh(1)
All times are GMT -4. The time now is 05:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy