[GRASS-dev] making a GRASS script go superuser and asking you a
password before running its command
Glynn Clements
glynn at gclements.plus.com
Mon May 21 14:42:51 EDT 2007
Yann wrote:
> Can anybody help/suggest:
>
> 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.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list