[Gambas-user] How to authenticate and switch to root user from within gambas application?

Benoit Minisini gambas at ...1...
Wed Oct 4 09:04:30 CEST 2006


On Wednesday 04 October 2006 08:35, Jose J. Rodriguez wrote:
> On 10/4/06, Fabien Bodard <gambas.fr at ...626...> wrote:
> > look at the console example !
> >
> > you can run a virtual shell and then execute something in it !
> >
> > maybe it can work ! And you need it as the instance for the program need
> > to be the same as the su one !
>
> Checked out the console example. I'm afraid running "su" in it gives
> the same error as SHELL: "su: su must be run from a terminal".
>
> Regards,
> Joe1962
>

In the development version, you can EXEC or SHELL application in a virtual 
terminal when they are needed:

EXEC [ "su" ] FOR INPUT OUTPUT

instead of EXEC [ "su" ] FOR READ WRITE

Then 'su' should not complain anymore, and you will be able to send it login 
and password.

The better, and maybe only good solution is to configurate and use the 'sudo' 
command. Because it is better for security reason to centralize all 
applications that need to be run as root and to define which users can use 
them.

Regards,

-- 
Benoit Minisini





More information about the User mailing list