While making a script to install GRASS Extensions, i run into a problem.
GEM needs root access to complete its task.
Then the user should run the script as root.
Is there a way to get the script to ask the user for the password and process
under root permission?
Use sudo or "su -c".
Note that if you're relying upon $LD_LIBRARY_PATH to find GRASS
libraries, sudo/su will reset it. You can use $GISBASE/etc/grass-run.sh
to execute a command with LD_LIBRARY_PATH restored.