Sponsored Content
Top Forums Shell Programming and Scripting Pass root password through script Post 302470762 by shahdeo on Thursday 11th of November 2010 04:34:29 AM
Old 11-11-2010
Bug

Using this function, I tar the file modules-2.6.20.1.tar on all Clients one by one. But everytime I need to enter the root password(123456) when script connects to clients one by one.
For e.g program is excuted on C1, then it connects to C2, I need to enter the password after which it is copied to C2...similarily for rest of the clients.

findClients
for Client in $Clients; do

echo -n "$Client " >t
ssh
root@$Client "tar -xvf /lib/modules/2.6.20.1/modules-2.6.20.1.tar"
2.6.20.1.tar"> h.txt
done
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script to change root password

Hi All, I'm looking for a script to change root password for about 200 servers of both Solaris and Linux. I'm not very good at scripting, can anyone share a script if you already have one? :) (3 Replies)
Discussion started by: kvadivel80
3 Replies

2. Shell Programming and Scripting

how to change root password using shell script with standard password

Hi Friends. I am new to scripting now i want to change the root password using the script with standard password. which is the easy scripting to learn for the beginner, Thanks in advance. (2 Replies)
Discussion started by: kurva
2 Replies

3. Solaris

Solaris 8 - Asks for current root password when trying to change root password.

Hello All, I have several solaris boxes running Solaris 8. When changing root passwords on them, all will simply ask for the new root password to change and of course to re-type the new password. One of the systems however asks for the existing root password before it will display the new password... (8 Replies)
Discussion started by: tferrazz
8 Replies

4. Shell Programming and Scripting

Create script for change root password via SSH

HI I 'm new shall script and unix. I want to create script for change password root by ssh-keygen command . I have 50 servers and I want ot login ot the servers via ssh by type ones password and can login every machines.The script ssh-keygen must ot generate key every weekly than it send new... (2 Replies)
Discussion started by: pellnapook
2 Replies

5. Shell Programming and Scripting

How to pass decrypted password to script

Hi Everybody, I am trying to write a script (ksh) to connect to oracle db via sqlplus. As I do not want the password to be in plain text, I've tried to use java to encrypt and decrypt it but I am not sure how can I pass the decrypted password to the script. Pls advise. Below is what I would... (1 Reply)
Discussion started by: Nick1971
1 Replies

6. UNIX for Advanced & Expert Users

How to auto pass password in shell script !

Hi all, I have a simple script to check the CPU, Swap Memory and Hard Disk. But I can auto assign password in the script to automatic run it in crontab. Everytime when I run this script, it require to insert password like the message below : How can I solve this problem ? (2 Replies)
Discussion started by: cafecoc85
2 Replies

7. Shell Programming and Scripting

Pass the password to su in shell script

Hello, I am using below command but this is asking for tty c42dba {/home/oracle}: echo sersnp | su -c ggs standard in must be a tty Best regards, Vishal (4 Replies)
Discussion started by: admin_db
4 Replies

8. Red Hat

Root password expiry script

Hi Guys In red hat linux server is there a way to alert via email when the root password is about to expire ? As per security policy in our environment root password will expire in 90 days. Example : It would be better if we receive a email on 7th november stating that the root password... (1 Reply)
Discussion started by: newtoaixos
1 Replies

9. Shell Programming and Scripting

How to pass root password with su and command?

Hello, I have list of around 400 devices. I need to restart a service /etc/init.d/psap23.sh in all of them, but it should restart by root only. Those have some other kind of light Linux. There is no sudo package in that and we can't/shouldn't install. Direct root login is not allowed. I login... (5 Replies)
Discussion started by: solaris_1977
5 Replies

10. UNIX for Beginners Questions & Answers

Parsing Root password inside a C shell script

Hello everyone, I want to check how long a remote computer is running (e.g. with the command uptime or who - b) The check should be done during login from none root user by a script which is called from .cshrc. My script works fine if I login as root but I want that everybody get the information... (5 Replies)
Discussion started by: Nadielosabra
5 Replies
NETDUMP-SERVER(8)						  System Programs						 NETDUMP-SERVER(8)

NAME
netdump-server - handle crash dumps over the network SYNOPSIS
netdump-server [--port portnumber] [--concurrent number] [--pidfile path] [--daemon] [--help] [--usage] DESCRIPTION
Listens to the network for clients that crashes and uses the netdump protocol to recieve a memory dump and a stack trace. The memory dump and oops message are stored in a timestamped directory in /var/crash. The server can also run scripts when some events happen. OPTIONS
--port portnumber Specifies the IP port number for the netdump server to listen to. The default is 6666. --concurrent number You can limit the amount of concurrent dumps being done at any one time. If more clients than the specified maximum connects at one time the last ones will just be logged and then rebooted. --pidfile path Store a pidfile. The default service uses /var/run/ttywatch.pid. The default is not to write a pidfile. --daemon ttywatch should background itself and run as a daemon. EXAMPLES
netdump-server --daemon This launches the netdump-server and puts it in the background, listening for crashed clients. EXIT STATUS
Exit status is 0 for a clean exit and non-0 for a non-clean exit. FILES
/etc/netdump.conf A configuration file read by netdump-server on startup. It is a "key=value" style file. Currently it supports the options: port, max_concurrent_dumps, daemon and pidfile. /etc/init.d/netdump-server An init script to start a default system installation of netdump-server. This is normally turned off by default; use the command /sbin/chkconfig netdump-server on to enable the netdump-server service. /var/crash The main directory where the crash dump files are stored. Each dump is put in a subdirectory named with the ip of the crashed machine and the date and time of the crash. /var/crash/scripts This directory can contain scripts that are run at various times. They all get passed the ip of the crashing machine as the first argument, and each one except netdump-start gets the directory that the dump is written into as the second argument. netdump-start - This is called when a client connects to the server to tell it that it has just started the netdump client. This normally means that the machine just booted up. netdump-crash - This is run when a client reports that it has crashed. If it returns a non-zero value the dump request will be ignored and the client will be told to reboot immediately netdump-nospace - This is run when there is not enough diskspace for the dump of the crashed machine. If this script exits with a non-zero return value netdump-server will try once again (but only once) before giving up the dump. If this script exits with a zero return value, netdump-server will reboot the client without performing a dump. netdump-reboot - This is run when netdump-server is finished with a client and is about to tell the client to reboot itself. SEE ALSO
netdump(8) BUGS
Report any bugs you find to http://bugzilla.redhat.com/bugzilla AUTHOR
Alexander Larsson <alexl@redhat.com> Linux 14 Feb 2002 NETDUMP-SERVER(8)
All times are GMT -4. The time now is 06:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy