[Gambas-user] Executing commands as root
David Villalobos Cambronero
david_villalobos_c at ...43...
Wed Aug 5 19:17:55 CEST 2009
Hey!!!! Thanks to all, very helpful
Regards
--
David
----- Original Message ----
From: Steven revimmo <steven at ...1652...>
To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Sent: Wednesday, August 5, 2009 9:30:46 AM
Subject: Re: [Gambas-user] Executing commands as root
I used this :
SHELL "kdesu " & Chr(34) & "/usr/sbin/lpadmin -p request_ps -v
'pipe:/bin/cat - > " & User.Home & "/request/work/tempfile.ps' -m
PostscriptColor.ppd -E" & Chr(34) WAIT
(to install a printer)
cheers,
steven
Le mercredi 05 août 2009 à 17:07 +0200, Stefano Palmeri a écrit :
> Il mercoledì 5 agosto 2009 15:45:24 David Villalobos Cambronero ha scritto:
> > Hi all,
> >
> > Time ago, someone asked about executing commands as root and pass the root
> > password to SHELL, does anybody remember the solution?
> >
> > Regards
> >
> >
> > --
> > David
> >
> >
>
> He was me. My error was I opened the shell process
> FOR READ WRITE instead of INPUT OUTPUT.
> I attache a little example so it will be clear howto.
> The example is a form with a textbox. You type
> the root password and confirm and you execute
> cat /etc/sudoers as root (you'll see the output on Gambas
> console). It's just an example, you can try any other root command.
> Other solutions includes using gtksu or kdesu, but this way you
> depend on desktop.
>
> Ciao,
>
> Stefano
>
> >
> >
> > ---------------------------------------------------------------------------
> >--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> > 30-Day trial. Simplify your report design, integration and deployment - and
> > focus on what you do best, core application coding. Discover what's new
> > with Crystal Reports now. http://p.sf.net/sfu/bobj-july
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________ Gambas-user mailing list Gambas-user at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
More information about the User
mailing list