On Sun, Mar 25, 2012 at 4:46 PM, sundar j <sundar_...@rediffmail.com> wrote:

> I am creating an application which calls bash scripts many time with
> sudo/root privilege. Though i can execute bash script with either kdesu or
> gksu, it asks password many times. Instead it would be nice if any one help
> me on opening an application with sudo/root access. I have searched in
> google and found only this link on the subject
try using "gksudo", this assumes the user is set up to use sudo
[on Ubuntu this is usually the case, not on the others]
Generally it will ask for a password the first time root access is
needed but not thereafter.

The other solution is the traditional UNIX one: to have a small
program which is "su exec", this is particular
mode which means the program is run as whoever owns the file, not the
user running it.

The mode is set using chmod

chmod u+s my-program

The wrinkle this that interpreted programs like Gambas can't do this,
only complied programs can
So you would need to write a small program in C/Pascal etc to do the
su work which the gambas program
calls.

Ian

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to