- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Need to learn how to pass user/pass as argumen...
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
Discussions
Discussions
Forums
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
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
тАО10-07-2009 11:26 AM
тАО10-07-2009 11:26 AM
Re: Need to learn how to pass user/pass as arguments.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-07-2009 02:51 PM
тАО10-07-2009 02:51 PM
Re: Need to learn how to pass user/pass as arguments.
> seconds. [...]
Yeah. No one could possibly write a script
to run "ps" repeatedly, until he got the
desired result.
> Yes you can set up a cron job like that.
Storing a password in a crontab file is just
about as wise as storing it in a shell
script. Or using it on a command line.
> Oct 7, 2009 15:15:43 GMT 2 pts
But what's my opinion worth?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2009 12:52 AM
тАО10-08-2009 12:52 AM
Re: Need to learn how to pass user/pass as arguments.
maybe it's not too late. for what reasons do you need a password? maybe it could be solved with a simple passwordless sudo...
Unix operates with beer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2009 04:42 AM
тАО10-08-2009 04:42 AM
Re: Need to learn how to pass user/pass as arguments.
Viktor,
The first script calls sets the environmental variables and passes the username and password to the next script. This is all new to me so I am not even sure it "passes" it. I do know that as I recieved the first script the instructions stated "# You must pass in the Oracle User ID and Password as arguments".
Here is an snippet from the next script.
# 1. Checks environment variables
# 2. Checks for existence of files to be processed in the /home directory
# 3. Checks then for each individual Mnemomic file. If found, the file is processed by calling a stored pl/sql procedure from the database
# Make sure environment variables are set up properly
EnvironmentOk="Y"
if [ -z ${ORACLE_HOME:-""} ]
then
EnvironmentOk="N"
fi
if [ -z ${ORACLE_USER_ID:-""} ]
then
EnvironmentOk="N"
fi
if [ -z ${ORACLE_PASSWORD:-""} ]
then
EnvironmentOk="N"
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2009 05:07 AM
тАО10-08-2009 05:07 AM
Re: Need to learn how to pass user/pass as arguments.
I think it would be the best to make a backup of the second script like this:
cp second.sh second_root.sh
and rewrite this second_root.sh - technically you should insert some sudo in front of the commands. And after that be sure to modify /etc/sudoers with visudo to have the passwordless sudo working!
Unix operates with beer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2009 08:17 AM
тАО10-08-2009 08:17 AM
Re: Need to learn how to pass user/pass as arguments.
echo "Loading..... " $file
sqlplus -s $ORACLE_USER_ID/$ORACLE_PASSWORD <
So you are saying I should add the Oracle user id and oracle password in this section instead of it looking for them? So it would look like this:
echo "Loading..... " $file
sqlplus -s username/password <
Also for the sudo part you are saying to use #sudo programtoexecute.sh ??
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-11-2009 11:39 PM
тАО10-11-2009 11:39 PM
Re: Need to learn how to pass user/pass as arguments.
>"Snippet from part 3:
echo "Loading..... " $file
sqlplus -s $ORACLE_USER_ID/$ORACLE_PASSWORD <
ok, this an interactive script.
>" The reason for the potential switch is >that I am trying to find a possible way to >cron this process nightly."
If you want to have run it from cron you should burn in the username/password and leave interactivity.
"echo "Loading..... " $file
sqlplus -s username/password <
It is right. Not the sudo way, but you should skip interactivity. In our environment sqlplus don't prompt for the password, but I don't really know it how it was done.
Unix operates with beer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-13-2009 08:35 AM
тАО10-13-2009 08:35 AM
Re: Need to learn how to pass user/pass as arguments.
Thanks for all the help.
- « Previous
- Next »