09-04-2018
-p is not interactive password input option for sudo command.
There is no such feature or switch.
Please correct the steps for better understanding, you are :
1. sshing to box hosting Oracle database as some generic user.
2. You wish to change the user to oracle user (the user under which the database is ran).
3. Source a file, after which you issue unlock of oracle database account.
If i'm not mistaken, a SYSTEM user should have required privilege to UNLOCK account, and you should be able to connect to database in standard way (sqlplus, toad etc.) and SYSTEM user ?
Why do you require ssh and sudo to do this operation ?
Why not use a DBA_DIRECTORIES or EXTERNAL TABLE in which a sshed user will write a simple text file and oracle will process via internal scheduler and/or procedure.
Use the database software you are paying gold for, you are over complicating it
Hope that helps
Regards
Peasant.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I've written a shell script to alter a particular preference file on OS X (10.3.9), which works fine (tested by running the script from the terminal sat in front of the box).
Problem is, I now have to run this script remotely across a number of machines via remote desktop, so where I've used the... (1 Reply)
Discussion started by: Brad_GNET
1 Replies
2. Linux
Hi all..
I'm secering a RH 2.1 server, with gnome (not my choice...), as X manager.
Is ther anyway to get sudo ask for root password other then the actual user's password? Like when you launch the graphical IHM to create a new user, it asks for root's password? Is there a way to do the same... (5 Replies)
Discussion started by: penguin-friend
5 Replies
3. Shell Programming and Scripting
edited and removed (0 Replies)
Discussion started by: mdpalow
0 Replies
4. Shell Programming and Scripting
Hello everybody,
Say I forgot my root password (shit happens, no?) and I'd like to brutally try 100 possibilities to delete a file using sudo. How can I make a script that tries all the passwords?
The following doesn't work. Do you have a clue?
foo:~$ cat test
sudo rm dummy <<< 'password'
echo... (1 Reply)
Discussion started by: chebarbudo
1 Replies
5. AIX
Hello
I have a partition with Aix 5.3 and I install sudo
I put the commands that I want to use x user and I put the option that donkask for password.
But when I run with this user and I try to run that commands. ask me for a password.
I put this line for no ask for password with that... (2 Replies)
Discussion started by: lo-lp-kl
2 Replies
6. Shell Programming and Scripting
salmo allikm warhmat allah wabrakato
i want to do script with sudo like
sudo su and want to put password in the script not get from user because i to made it startup when booting and i don't know how put in script for sudo
thanks (5 Replies)
Discussion started by: pua06
5 Replies
7. Shell Programming and Scripting
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
8. Red Hat
Little confused here
When i go to run sudo nohup ./script.ksh &
I dont get asked for a password.
It starts a process ID, I can see it when i do a ps -ef | grep script.
But I dont get an output file from my script, so its not doing anything.
What gives?
does it have to do the "&" ?
... (4 Replies)
Discussion started by: nitrobass24
4 Replies
9. UNIX for Dummies Questions & Answers
hi,
i have a requirement where i need to sudo to another user in the shell script.suppose consider user A and B, first user A calls a shell script and then i need to sudo to user B which executes another shell script inside the earlier one.
also this needs to be automated like while sudo'ing to... (3 Replies)
Discussion started by: krk
3 Replies
10. UNIX for Dummies Questions & Answers
cleanwork /saswork removes sas orphanded processes in the saswork directory. Subdirectories under sasem are sas94, sas92 and sasworks .
I am getting the following error messages:
1.
'/usr/bin/sudo -S apt-get update <~/opt/SiM/pos/ps/db_auth.cfg... (4 Replies)
Discussion started by: dellanicholson
4 Replies
LEARN ABOUT OSF1
mailauth
mailauth(8) System Manager's Manual mailauth(8)
NAME
mailauth - manipulate alternate authorization database for Post Office Protocol (POP), Internet Message Access Protocol (IMAP), and APOP
users.
SYNOPSIS
/usr/sbin/mailauth [-init] [-convert] [-list [-type POP | APOP | IMAP]] [-delete name] [-user name [-type POP | APOP | IMAP]]
OPTIONS
Initialize the database. You must be superuser to use this option. Convert an existing APOP only database to the new format. You must be
superuser to use this option. Used to list the entries in the mailauth database. If no type is specified, all entries in the database will
be displayed. The display will consist of one column corresponding to the username and another column for the type of user. If a type is
specified using the -type option, only entries for the corresponding type of user (POP, APOP, or IMAP) will be displayed. Used by the sys-
tem administrator to either add a user to the mailauth database, to change the password for the user, or to change the type of user. The
administrator will be prompted for a new password and then a verification of the password. If the type is not explicitly specified and a
previous entry does not exist, then it will default to APOP. Used to delete the entry corresponding to name from the mailauth database.
DESCRIPTION
The mailauth program allows a POP, IMAP, or APOP (an alternate authentication method for POP) user to change the secret value used to gen-
erate their authentication credentials. In addition, both the superuser and the user pop may use this program to either add or remove a
user, or to print public information from it. Only the superuser may initialize or convert the database.
A user can change their own passwords or add themselves to the mailauth database by entering the mailauth command. If an entry already
exists, the user is first prompted to enter the old password. If the password does not correspond with the one in the database, the trans-
action will be ended. Otherwise, the user will be prompted for a new password and a verification of the password. The user is not allowed
to change the type of user they are. For example, they cannot change themselves from a user using the APOP command during the POP Autho-
rization State to a user using the Internet Message Access Protocol (IMAP). If an entry does not already exist in the database, the user
will be added as an APOP user.
Under normal usage, mailauth prompts for a new secret, just like the passwd program. It then updates the POP authorization database
accordingly.
FILES
POP authorization database
SEE ALSO
Command: imapd(8), mailusradm(8), pop3d(8)
mailauth(8)