When I tried to include sudo command in the place script to be executed I am getting this error messages, any idea how can I overcome !!!!
when I run this script I am getting this error message
$ ./remotescript
Pseudo-terminal will not be allocated because stdin is not a terminal.
Hi,
I am having nightmare issue-ing remote ssh command from a CGI perl script.
It just won't run on debug message: It says permission denied. Can I even do this? as the apache server running under DAEMON account probably can't execute it? Is this the case of what's going on?
Here is my... (3 Replies)
Hi all,
I am facing the following issue:
Host A should execute a remote command (say pwd) on host B2.
B2 is not directly reacheable but you have to connect from a to B1, then from B1 you can execute the command ssh user@B2 pwd.
B1 and B2 are directly connected:
A => B1 => B2
| ... (3 Replies)
Help please!!
I want to use ssh to execute a remote exe and while it's running I want to query for the process ID of the exe (2 different ssh commands)
1. sshpass -p "<passwd>" ssh -f -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@<ipaddress> nohup /tmp/mmds_asyn &
2.... (0 Replies)
Hi,
I need a script that will connect to a list of servers and first sudo to root and then run a couple of commands.
For security reasons, we can't setup ssh keys as root.
Manually I have to login to a server as user and then sudo to root.
It's not possible to use root@servername , because of... (8 Replies)
Hi,
The below command is not giving me the count , Can somebody help me in re-writing this pls .
Proc_Exist=`ssh -q -o "BatchMode=yes" -o "PasswordAuthentication=no" $OAUSER@${Primary_Node} ps -ef |
grep -v grep | grep "${ICM_Proc}" |wc -l `
Also the same problem with below... (13 Replies)
How should i make the following code working
#!/bin/bash
INPUTFILE="test.txt"
while read STRING; do
IP=`host -t A $STRING | awk '{print $NF}'`
HOSTNAME=`ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no $IP "hostname"`
echo $HOSTNAME > out.txt
done < $INPUTFILE
At this moment while... (3 Replies)
Hi,
My goal is to connect from unix server A to windows server B and call a bat file on windows.
I am able to succeed in remoting to windows and executing a command, the issue i am facing is the shell scrip is exiting without making sure of bat file success.
Can you please help me in... (4 Replies)
Hello i am having an issue with bash script and this is the code
now=$(cat hosts1.txt | awk '{print $2;}')
while read n ;do
ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers'
When i execute only part with cat, it... (8 Replies)
How to execute setDomainEnv.sh in wblogic via ssh on remote server in shell script
we execute setDomainEnv.sh manually as . ./setDomainEnv.sh from its location ie /opt/SP/users/domian/bin"
My approach is not working.
Please advise.
#!/bin/bash
set -x
base="/opt/SP/users/d1/bin"... (5 Replies)
Discussion started by: abhaydas
5 Replies
LEARN ABOUT OPENSOLARIS
gksu
GKSU(1) General Commands Manual GKSU(1)NAME
gksu - a Gtk+ su frontend
SYNOPSIS
gksu [ options ] <command>
gksudo [ options ] <command>
DESCRIPTION
This manual page documents briefly gksu and gksudo
gksu is a frontend to su and gksudo is a frontend to sudo. Their primary purpose is to run graphical commands that need root without the
need to run an X terminal emulator and using su directly.
OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is
included below.
Common Options:
--user <user>, -u <user>
Calls <command> as the specified user
--message <message>, -m <message>
Replaces the standard message shown to ask for password for the argument passed to the option
--sudo-mode, -S
Use sudo instead of su as backend authentication system. Notice that the X authorization magic will not work when using sudo for
target users other than root.
--title <title>, -t <title>
Replaces the default title with the argument
--icon <icon>, -i <icon>
Replaces the default window icon with the argument
--print-pass, -p
Asks gksu to print the password to stdout, just like ssh-askpass. Useful to use in scripts with programs that accept receiving the
password on stdin.
--disable-grab, -g
Disables the "locking" of the keyboard, mouse, and focus done by the program when asking for password
--ssh-fwd, -s
Strip the host part of the $DISPLAY variable, so that GKSu will work on SSH X11 Forwarding.
--login, -l
Makes this a login shell. Beware this may cause problems with the Xauthority magic. Run xhost to allow the target user to open win-
dows on your display! This is ignored if running with sudo as backend for authentication.
--preserve-env, -k
Preserve the current environments, does not set $HOME nor $PATH, for example.
FILES
/etc/gksu.conf
Configuration file to setup system-wide defaults for gksu/gksudo. It provides an option to force the display grabing, also.
RETURN VALUE
On success, gksu will return 0. If an authentication error ocurred, it will exit with error code 3. If the user canceled the dialog or
closed the window, it will return error code 2. On other error conditions, gksu will return 1.
NOTE
Note that <command> and all its arguments should be passed as one single argument to gksu just like one would to when using su.
SEE ALSO su(1), gksuexec(1).
AUTHOR
This manual page was written by Gustavo Noronha Silva <kov@debian.org> for the Debian GNU/Linux system (but may be used by others).
2003 GKSU(1)