Sponsored Content
Top Forums Shell Programming and Scripting Ssh does not support sqlplus and sudo -i? Post 302968132 by h1kelds on Friday 4th of March 2016 04:59:21 AM
Old 03-04-2016
OK, how should I execute the full command then?
Code:
ssh -nq <host> -l <user> "/usr/bin/sudo -u <orauser> -i echo 'show sga' | /oracle/<SID>/112_64/bin/sqlplus / as sysdba"
Error 6 initializing SQL*Plus
SP2-0667: Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

The simple sqlplus command is still working.

but how can I combine these?
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

xwindows over ssh after sudo?

ok...I'm stumped on this one. I cannot figure out how to carry over my environment variables with a sudo command. I need to install an application under root and only have sudo access to get there. I can use ssh -Y <host> and launch an xwindows session successfully as myself but as soon as I sudo... (3 Replies)
Discussion started by: scottsl
3 Replies

2. UNIX for Advanced & Expert Users

sudo and ssh

Hello, Can you config sudo to use the passphrase in the user ssh-key instead of the one in the passwd? Some users do not have local passwords on the system and instead of adding the NOPASSWD in sudoers I would like the solution I asked about above. Thx Jocke (3 Replies)
Discussion started by: jOOc
3 Replies

3. UNIX for Advanced & Expert Users

sudo and ssh

Hi, I would like to know how i can perform a task, while performing ssh, sudo and command at the same time. What I generally do is I ssh to the server, where i created private and public, so it does not prompt me for password all the time. Then i need to run "sudo su - ldaprole" to get into... (9 Replies)
Discussion started by: john_prince
9 Replies

4. UNIX for Advanced & Expert Users

ssh and sudo login

Hi, I am trying to execute some command, via ssh and sudo. Here is what i want to do. ssh localhost | sudo su - ldaprole | ls -ltrh However, this command gives me listing of my home directory, and not of ldaprole. If I logic directly, when i perform sudo su - ldaprole, it... (5 Replies)
Discussion started by: john_prince
5 Replies

5. Shell Programming and Scripting

ssh foo.com sudo command - Prompts for sudo password as visible text. Help?

I am writing a BASH script to update a webserver and then restart Apache. It looks basically like this: #!/bin/bash rsync /path/on/local/machine/ foo.com:path/on/remote/machine/ ssh foo.com sudo /etc/init.d/apache2 reloadrsync and ssh don't prompt for a password, because I have DSA encryption... (9 Replies)
Discussion started by: fluoborate
9 Replies

6. Programming

Using Commands over SSH using Sudo

Is there a way to transfer my sudo password via ssh so that I can copy files remotely and pass them locally, so: cat sudo-passwd-file|ssh -t user@10.7.0.180 'sudo find / -depth|cpio -oacv|gzip' > /path/to/dir/file.cpio.gz I am in the process of a creating a script. Everytime I try and just... (16 Replies)
Discussion started by: metallica1973
16 Replies

7. Shell Programming and Scripting

Ssh not supporting sudo and sqlplus commands

Hi Guys , I was facing an issue some thing like , I have to connect remote machine and should execute few commands over there , I am able to run some simple commands , but below commands are throws error like not found. eg : sudo su - username and sqlplus user/pwd@db , srvrmgr commands etc ... (8 Replies)
Discussion started by: chandini
8 Replies

8. Cybersecurity

Help on Ssh using sudo

I'm confused in the configuration of sudoers for one group of users. The users need to execute a app from a remote machine, in this local machine they want me to allow ssh for them using sudo for eg. sudo -u admin ssh -X euadmin@<IP address of remote> <remote script which opens a gui> It... (1 Reply)
Discussion started by: anandk
1 Replies

9. Shell Programming and Scripting

Sqlplus not working through ssh

Hi Gurus, I was trying to execute sqlplus command remotely like ssh -q IP venkat@"which sqlplus" am getting error as which: no sqlplus in (/usr/local/bin:/bin:/usr/bin) if i connect manually and executing which sqlplus it working fine. Please help to fix the issue. Regard's Venky (7 Replies)
Discussion started by: venky.b5
7 Replies

10. UNIX and Linux Applications

SSH Protocol Support

Hi there, I learnt about a case where SSH-1.99 is supported by SSH service, both SSH 1.5 and 2.0 is special. Btw, I want to know what kind of authentication mechanism are supported by SSH, here is what I thought of: Public/ Private Key Pair Password Authentication (1 Reply)
Discussion started by: alvinoo
1 Replies
SVNWRAP(1)						      General Commands Manual							SVNWRAP(1)

NAME
svnwrap - Umask wrapper for subversion client commands SYNOPSIS
svnwrap {program} [args...] DESCRIPTION
svnwrap is a simple shell script to work around permission problems when sharing Subversion repositories between multiple local users. svnwrap can be used either by specifying a particular subversion client command on the command line, or by invoking it by the same name as the desired client command, via a symlink. svnwrap sets the umask to 002, then launches the appropriate subversion client command. For complicated reasons, this is needed when using the clients with BDB-format repositories, but not for FSFS-format ones. EXAMPLES
To create a new BDB-format shared repository (note that FSFS-format shared repositories should also be created this way): svnwrap svnadmin create --fs-type=bdb /path/to/repo chgrp -R shared_group /path/to/repo The following line in /etc/inetd.conf can be used to serve svn:// URLs: svn stream tcp nowait my_svn_user /usr/bin/svnwrap svnserve svnserve -i -r /srv/svn The following commands enable use of svnwrap for local file:/// and remote svn+ssh:// URLs: ln -s /usr/bin/svnwrap /usr/local/bin/svn ln -s /usr/bin/svnwrap /usr/local/bin/svnserve svn is used for local file:/// URLs, and svnserve is invoked by remote users of svn+ssh:// URLs. BUGS
If you symlink the svn binary to svnwrap, as shown in one of the examples, all local users' working copies will also use the new umask. Be sure to warn your users about this, as security-related surprises are rarely pleasant. SEE ALSO
svnserve(8), svn(1), svnlook(1). AUTHOR
svnwrap and this manual were written by Peter Samuelson for the Debian Project (but may be used by others). 2006-04-21 SVNWRAP(1)
All times are GMT -4. The time now is 08:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy