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 |
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 |
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 |
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, :rolleyes: 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 |
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 |
All times are GMT -5. The time now is 03:51 AM. |