prompt for root password and passing to a program
I am creating a script that will automatically install some source code and hence, requires the root password to be used. This program will be written in Java. Basically I need to program to be able to accept the root password as a variable then use it when the 'make install' stage comes around.
Alternatively, I would like to become the superuser automatically, ie switch to root PID.
The other uglier way to run this is that you must be root so the password is not needed. Hmm.
Any help on this?