What are you trying to accomplish by doing su to root and passing the password? There are other ways of having jobs/processes run as root... "su " is not going to accept any redirection on the input...
M
>>> "Richard Flores " <oracledba-ezmlmshield-x85586216.[Email address protected] 08/31/04 02:59PM >>>
The password it wants in not read by "stdin", so you can't do a simple
redirect.
You have to use something like the "expect" utility.
-----Original Message-----
From: Jay Sethi
[mailto:oracledba-ezmlmshield-x84237029.[Email address protected]
Sent: Tuesday, August 31, 2004 11:49 AM
To: LazyDBA Discussion
Subject: su'ing in a UNIX script
Hi,
I need to pass the Password to the superuser command as follows:
su - superuser_id
As is, the above when executed from the command line expects after the
string "Password:" on the next line.
I can not get root privileges.
Thanks.
Jay
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:http://www.lazydba.com/legal.html
Oracle LazyDBA home page