- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Remote login
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2001 10:10 PM
07-30-2001 10:10 PM
Remote login
I would like to get an opinion from anyone of you to solve my problem. I would like to create a shell script to do remote login using root from server a and to login to server b using oracle. At the same time i would like to encrypt the password for oracle so nobody can read it from my shell script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2001 10:24 PM
07-30-2001 10:24 PM
Re: Remote login
Oracle passwords should NEVER be placed in any script:
1. for obvious security reasons.
2. when you change the Oracle password (as you do regularly ;) your script will fail.
As an alternative create an Oracle user with external authentication (the former ops$users) which will be able to enter Oracle without password (authentication will be done at OS level): "sqlplus /" will be sufficient to enter Oracle.
regards,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2001 10:29 PM
07-30-2001 10:29 PM
Re: Remote login
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2001 10:53 PM
07-30-2001 10:53 PM
Re: Remote login
If you are talking about startup/shutdown things are less complex: "su - oracle $ORACLE_HOME/bin/dbstart" and dbshut would probable be all you need.
regards,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2001 11:02 PM
07-30-2001 11:02 PM
Re: Remote login
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2001 11:15 PM
07-30-2001 11:15 PM
Re: Remote login
In order to remote shell a command from serverA ( user root ) to serverB ( user oracle ), do the following :
1. Create a file with name ".rhosts" in the home directory of user Orcale on server b.
The content of this file is only the following line:
serverA +
2. chown oracle:dba .rhosts
( I suppose that the group of user oracle is the standard oracle group : dba ).
3. chmod 400 .rhosts
4. from serverA issue your command like :
remsh serverB -l oracle -n " yourCommand options..."
5. Standard output and error will be directed to serverA.
Notice : I suppose that the name resolution of serverB is solved either by /etc/hosts or DNS.
Magdi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2001 11:21 PM
07-30-2001 11:21 PM
Re: Remote login
if you have a standard oracle setup, the following should work from serverA (if .rhosts has been setup):
from serverA:
remsh serverB "/sbin/init.d/oracle stop"
or
remsh serverB "/sbin/init.d/oracle start"
(/sbin/init.d/oracle contains the $ORACLE_HOME/bin/dbstart)
good luck,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2001 11:24 PM
07-30-2001 11:24 PM
Re: Remote login
As you could see, you don't need to give any oracle password in the command, this validation is done implicitly via .rhosts file.
Magdi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2001 11:50 PM
07-30-2001 11:50 PM
Re: Remote login
I've tried your solution but it give me the same error on my previous attemp which is Oracle Server Manager Release 2.3.4.0.0 - Production
Copyright (c) Oracle Corporation 1994, 1995. All rights reserved.
Oracle7 Server Release 7.3.4.4.0 - Production
With the distributed, replication and parallel query options
PL/SQL Release 2.3.4.4.0 - Production
SVRMGR> MGR-11401: input error, unable to read input line
MGR-01508: unable to close the current file
Rgrds
Jamal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2001 01:10 AM
07-31-2001 01:10 AM
Re: Remote login
You output is :
SVRMGR> MGR-11401: input error, unable to read input line
MGR-01508: unable to close the current file
----
Sounds like you are trying to give an input file to the Oracle Server Manager. ->
This file must be on the remote server and you may refrence it by giving an absolute path.
may you attach what you are doing to easy debug !
Magdi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2001 01:38 AM
07-31-2001 01:38 AM
Re: Remote login
#!/bin/sh
ORACLE_HOME=/opt/oracle/product/7.3.4 ; export ORACLE_HOME
ORACLE_SID=TEST; export ORACLE_SID
echo $ORACLE_SID
$ORACLE_HOME/bin/svrmgrl <
select UPPER(TABLESPACE_NAME) from dba_tablespaces order by TABLESPACE_NAME;
quit
echo "\nOnline Backup Completed."
EOF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2001 02:05 AM
07-31-2001 02:05 AM
Re: Remote login
at first view the 'echo "\nOnline Backup Completed."' should be placed after the 'EOF' because it does not belong to the svrmgrl commands.
good luck,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2001 02:08 AM
07-31-2001 02:08 AM
Re: Remote login
The before EOF statment :
echo "\nOnline Backup Completed."
should be put after the closing EOF.
Because, Oracle Server Manager try to interprete it as part of the set of commands.
Magdi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2001 02:16 AM
07-31-2001 02:16 AM
Re: Remote login
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2001 02:40 AM
07-31-2001 02:40 AM
Re: Remote login
I tried your script and it worked like a charm,
I just replaced 'quit' by 'exit' ;)
You do execute the script as user oracle?
regards,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2001 03:03 AM
07-31-2001 03:03 AM
Re: Remote login
I simulate your case:
Your script is running locally without problems, but when you run it remotely you MUST explicitly specify all your environment variables and to refrence all commands with its absolute path.
1. In the begining of your script : set all variables that you need .
2. If you reference any command, reference it with it's absolute path.
Verification :
1. logon to the remote system ( A ).
2. type the env command
3. logon to the local system ( B )
4. remote shell the command env on remote server ( A )
5. Compare the result from 2 and 4 : They are not equal ... and more : point 4 reports only six variables in the environment.
Magdi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2001 08:37 AM
08-04-2001 08:37 AM
Re: Remote login
do you have an "Oracle password file" set for that
instance? It would be located in "$ORACLE_HOME/dbs/"
and have a name like "ora$ORACLE_SID.pwd" or the
like. Move it aside, then, temporarily (but it is needed,
when you try to start the instance remotely with the
Oracle Enterprise Manager commands).
Anyway, check wether the unix-login you are using
is member of the group "dba" (or whatever group you
have used on installation of Oracle).
HTH,
Wodisch