LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 03-17-2003, 05:28 AM   #1
rameshvl
LQ Newbie
 
Registered: Mar 2003
Location: Bangalore
Posts: 12

Rep: Reputation: 0
Unhappy accepting root passwd from UI and passing it to a shell script to extract a rpm


Hi

Im working on Redhat Linux.
Im a normal/domain user and Im writing an installation program which opens up a UI asking for root password and installs Java (jdk) using the
j2sdkXXX.rpm package.

If I run a shell script with the command

su -c "rpm -i j2sdkXXX.rpm"

how can I pass the super user password to the script from my UI ??.

su seems to be taking the password only thru the console and not from other
sources (variable,file etc)
Can anybody help me ??!!

(I also tried to use

stty -F file.txt

with file.txt containing password
It dint work out)

Awaiting solution ...


Thanks in advance,
rameshvl
 
Old 03-17-2003, 05:46 AM   #2
doublefailure
Member
 
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747

Rep: Reputation: 30
just an idea.

there is a script that connects to telnet or ftp
(u also have to prived passwd to connect)
u might get a hint there
 
Old 03-17-2003, 05:59 AM   #3
rameshvl
LQ Newbie
 
Registered: Mar 2003
Location: Bangalore
Posts: 12

Original Poster
Rep: Reputation: 0
yeah i know, but i dont want to do my job thru telnet or ftp (cant depend on telnet or ftp which is totally not related to my job)
I want to do it only thru shellscripts or something else in unix/linux
 
Old 03-17-2003, 11:21 AM   #4
doublefailure
Member
 
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747

Rep: Reputation: 30
i was thinking your problem is actually
your shell script variable -> su console prompt

which is effectively same as
the auto ftp script variable -> passwd console prompt

if i misunderstood,
i don't know

mandrake **drake utils pop up login passwd and su the user
so i think there 's gotta be an answer.

good luck
 
Old 03-18-2003, 01:11 AM   #5
rameshvl
LQ Newbie
 
Registered: Mar 2003
Location: Bangalore
Posts: 12

Original Poster
Rep: Reputation: 0
yeah buddy,
even RedHat's kpackage (package installater) opens up a UI asking root password before opening the installer,
so, even i feel, there's gotta be an answer

thanks anyway
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing parameters to a shell script neocookie Linux - General 5 10-20-2005 12:44 PM
passing parameters to functions in shell script kushalkoolwal Programming 1 09-28-2005 03:40 PM
Passing arguments to a shell script subu_s Programming 3 09-02-2005 06:13 AM
Passing variables from AWK script to my shell script BigLarry Programming 1 06-12-2004 05:32 AM
passing quotes in shell script Tenor Trombone Programming 1 04-18-2001 10:26 PM


All times are GMT -5. The time now is 01:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration