Logging in to multiple Linux servers and running the command.
Hi,
I am trying to write a script to run a command on multiple linux based servers and get the o/p. I am using ssh to login. It is a celerra box and EMC NAS product.
I am able login but i am not able to run nas command nas_pool -size -all the NAS server. I am getting the following error.
here is my code. I have added the directory where the command or found but still the bash is not able to run the command. I tired with #!/bin/bash and #!/bin/sh none of the shell are working here is the code that I am running.
I am not sure what I am missing. EMC Celerra is a propitiatory LINUX. I did get the o/p for pwd command. I am not sure why /nas/sbin/nas_pool -size -list is not working.
Hi
Is there any shell script that accesses multiple linux servers to get details such as CPU usage, RAM used etc. The access of the servers must be parallel not serial in the sense it must ping all the servers at a time to get information.The script has to be triggered from a host system and get... (7 Replies)
Experts,
Im trying to remote into a server, run a script that resides on that server and capture the information displayed & store in a local file.
I struggled with this yesterday & finally that script is working now.
Now, here is a scope creep and the script that I wrote for 1 remote... (2 Replies)
Hi All,
Okay, I need help.
I need to ssh in to multiple linux servers execute certain commands and get them to email and print on the screen when the script is being executed.
So below is my script. Its not working :-(.
#!/bin/bash
#linux/UNIX box with ssh key based login... (7 Replies)
I am trying to upgrade many installations of a gallery script called coppermine through the commandline.
I've copied the latest files of the script to each account.
Then, I need to run a file gallery/update.php
which requires I log in
I can create an admin user for myself for each... (2 Replies)
Hi,
I want to collect info from a no. of servers whether there grub.conf contain "elevator" parameter or not.
What I want is
sudo cat /etc/grub.conf | grep -q "elevator=noop"; echo $?
If output is "0", I want name of that host in a file called "present"
if its not "0", I want that... (4 Replies)
Suppose i have 3 different servers say x,y and z.
Im running some process say ABC and 40 instances for the same is being created.
In load sharing suppose on
server x, 20 instances are running
server y, 10 instances are running
server z, 10 instances are running.
While checking the... (1 Reply)
Hi all,
I am baffled on this. Solaris Irix system.:confused:
I have 4 servers all connected to one another, :b: I need to write a script line that would login on to server 1-3 ($HOST) start a script in the back ground and log off while the back ground script runs over a length of time.:eek:
... (10 Replies)
A webservice running on multiple servers. A patch has been deployed to them and it got successful only in some set of servers. The change is in format of "logontime" from "dd.mm.yyyy hh24:mi:ss" to "dd/mm/yyyy hh24:mi:ss". A script has already generated the output from all servers with request and... (2 Replies)
Hi All,
How can i run a single command on multiple servers with or without giving credentials.
I have a file(servers.txt) which has got list of servers and i want to run a command lsb_release -dr on all these servers and get output of those servers against each server.
I tried below code... (9 Replies)
Discussion started by: darling
9 Replies
LEARN ABOUT SUSE
login
LOGIN(1) Linux Administrator's Manual LOGIN(1)NAME
login - Begin session on the system
SYNOPSIS
login [ -p ] [ -h host ] [ -H ] [ -f username | username ]
DESCRIPTION
login is used when signing onto a system. If no argument is given, login prompts for the username.
The user is then prompted for a password, where approprate. Echoing is disabled to prevent revealing the password. Only a small number of
password failures are permitted before login exits and the communications link is severed.
If password aging has been enabled for the account, the user may be prompted for a new password before proceeding. He will be forced to
provide his old password and the new password before continuing. Please refer to passwd(1) for more information.
The user and group ID will be set according to their values in the file. There is one exception if the user ID is zero: in this case, only
the primary group ID of the account is set. This should prevent that the system adminitrator cannot login in case of network problems. The
value for $HOME, $SHELL, $PATH, $LOGNAME, and $MAIL are set according to the appropriate fields in the password entry. $PATH defaults to
/usr/local/bin:/bin:/usr/bin:. for normal users, and to /sbin:/bin:/usr/sbin:/usr/bin for root if not other configured. The environment
variable $TERM will be preserved, if it exists (other environment variables are preserved if the -p option is given) or be initialize to
the terminal type on your tty line, as specified in /etc/ttytype.
Then the user's shell is started. If no shell is specified for the user in /etc/passwd, then /bin/sh is used. If there is no directory
specified in /etc/passwd, then / is used (the home directory is checked for the .hushlogin file described above).
login reads the /etc/login.defs(5) configuration file. Please refer to this documenation for options which could be set.
OPTIONS -p Used by getty(8) to tell login not to destroy the environment
-f Used to skip a second login authentication. This option is deprecated and should not be used. It does specifically not work for
root. Using this option also means, that not all PAM functions are called.
-h Used by other servers (i.e., telnetd(8)) to pass the name of the remote host to login so that it may be placed in utmp and wtmp.
Only the superuser may use this option.
-H Used by other servers (i.e., telnetd(8)) to tell login that printing the hostname should be suppressed in the login: prompt.
FILES
/var/run/utmp - list of current login sessins
/var/log/wtmp - list of previous login sessions
/etc/passwd - user account information
/etc/shadow - encrypted passwords and age information
/etc/motd - system message file
/etc/login.defs - configuration file
SEE ALSO init(8), getty(8), mail(1), passwd(1), passwd(5), environ(7), shutdown(8), login.defs(5)BUGS
A recursive login, as used to be possible in the good old days, no longer works; for most purposes su(1) is a satisfactory substitute.
Indeed, for security reasons, login does a vhangup() system call to remove any possible listening processes on the tty. This is to avoid
password sniffing. If one uses the command "login", then the surrounding shell gets killed by vhangup() because it's no longer the true
owner of the tty. This can be avoided by using "exec login" in a top-level shell or xterm.
AUTHOR
Derived from BSD login 5.40 (5/9/89) by Michael Glad (glad@daimi.dk) for HP-UX
Ported to Linux 0.12: Peter Orbaek (poe@daimi.aau.dk)
Added new features: Thorsten Kukuk (kukuk@suse.de)
PAM Login 3.32 2. May 2007 LOGIN(1)