09-27-2012
I was able to generate ssh keys and thus avoid need to enter password while doing ssh from server1 to server2. :-)
But, I am trying to do sudo from local_script which I think is the proper way to do it but facing same problem, it doesn't show prompt after sudo command to enter password. May be because I am sending this code from one server to other.
Error that I am getting is
sudo: no tty present and no askpass program specified
Any suggestions please?
---------- Post updated at 09:43 PM ---------- Previous update was at 09:26 PM ----------
One thing to mention here is I don't want to enter password from script. It is ok if it prompts for password and wait till user enters password manually.
My problem here is that scripts doesn't stop/wait on password prompt for user to enter the password. :-(
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to write a Kshell program which will start the servers(Oracle,DataIntegrator).
Can anybody help me with this?
I would appreciate your help.
Thanks in advance (0 Replies)
Discussion started by: pari111222
0 Replies
2. AIX
Hi to all
now we running mksysb to nim on aix servers.
we are planning to take mksysb from vio servers.
can we use the same script for vio servers.
thanks (10 Replies)
Discussion started by: honeym210
10 Replies
3. Shell Programming and Scripting
Hi All,
I have some script that run some commands and send results to my email. I want to run same script on mulitiple servers. How can I do that. I know there is an option "ssh". But I'm not quite sure how to use it in the script.
And also. scripts has some parameters like following,
if :... (10 Replies)
Discussion started by: s_linux
10 Replies
4. Shell Programming and Scripting
Hello,
I am a Unix newbie and I need a script in which I can run a command on multiple servers at work. The command is to start a storage process and I am sick of doing it manually on all servers..
Here's the command:
/opt/bss/bin/snmptable -CB -v2c -c P67LzuBm hostname hrStorageTable... (4 Replies)
Discussion started by: kinyyy
4 Replies
5. Shell Programming and Scripting
Hello Everyone,
How do we run vi/vim encrypted shell script without decryption on multiple servers. It is a simple bash script and vim -nx <filename> has been used to encrypt with desired password. Now I have few errors, the syntax is absolutely fine as I have run that script multiple times on... (0 Replies)
Discussion started by: lovesaikrishna
0 Replies
6. AIX
I need run a command such as ps -ef |grep xxx on a batch of servers, how to write a script to run it without password? don't need go in each server to check?
Thanks (7 Replies)
Discussion started by: rainbow_bean
7 Replies
7. Shell Programming and Scripting
I have number in file which contains date and serial number:
2013101000.
The last two digits are serial number (00). So maximum of serial number is 100.
After reaching 100 it becomes 00 with incrementing 10 which is day with max 31.
after reaching 31 it becomes 00 and increments 10... (31 Replies)
Discussion started by: Natalie
31 Replies
8. Shell Programming and Scripting
I need to run a script on a bunch of remote servers. how can this be done without ssh into each individual server and run it
its under /sbin/script.sh on each server (1 Reply)
Discussion started by: tdubb123
1 Replies
9. Shell Programming and Scripting
We have 15 servers. Hostnames for these 15 servers are stored in a text files and loop through each server to connect to the remote server and run a command, but this loop process runs the command one after another. However, the requirement is to run the same command on all 15 servers at the same... (10 Replies)
Discussion started by: laknar
10 Replies
LEARN ABOUT NETBSD
ypinit
YPINIT(8) BSD System Manager's Manual YPINIT(8)
NAME
ypinit -- initialize NIS subsystem
SYNOPSIS
ypinit -c [domainname] [-l server1,...,serverN]
ypinit -m [domainname] [-l server1,...,serverN]
ypinit -s master_server [domainname] [-l server1,...,serverN]
DESCRIPTION
ypinit initializes the files and directories that are required for a NIS client or server.
If domainname isn't specified, the default domain (as returned by domainname(1)) is used.
The following options are available:
-c Create a NIS client. Initializes /var/yp/binding/<domain>.ypservers to contain a list of ypservers for ypbind(8) to connect to.
-l server1,...,serverN
Set the list of client servers from the command line rather than prompting for them interactively. The format is a comma separated
list of server names with no spaces.
-m Create a master NIS server. Generates map data from local files (/etc/master.passwd, /etc/group, etc.).
-s master_server
Create a slave server. Downloads the maps from master_server, which should be the active master NIS server.
To rebuild or refresh the maps for the NIS domain <domain>, change to the /var/yp/<domain> directory and run make.
FILES
/var/yp master NIS directory; contains the template makefiles.
/var/yp/<domain> directory to store NIS maps for <domain>.
/var/yp/binding/<domain>.ypservers
list of NIS servers to bind to.
SEE ALSO
domainname(1), make(1), makedbm(8), mknetid(8), nis(8), stdethers(8), stdhosts(8), ypbind(8), yppush(8), ypserv(8)
AUTHORS
Originally written by Mats O Jansson <moj@stacken.kth.se>. Modified by Jason R. Thorpe <thorpej@NetBSD.org>.
BSD
February 26, 2005 BSD