[Gambas-user] Executing commands as root

Steven revimmo steven at ...1652...
Wed Aug 5 17:30:46 CEST 2009


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



More information about the User mailing list