[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: using kdesu on kubuntu
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2008-08-01 17:57:30
Message-ID: 200808011157.31244.aseigo () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Friday 01 August 2008, David Boosalis wrote:
> On Fri, Aug 1, 2008 at 8:46 AM, Aaron J. Seigo <aseigo@kde.org> wrote:
> > On Thursday 31 July 2008, David Boosalis wrote:
> > > Hi
> > >
> > > I am using KDE4 on a PC-104 board that runs a instrument.  One of the
> > > screens allows them to set the IP address.  My thinking was that when
> >
> > they
> >
> > > hit the 'Apply' button I would use the KDESu class to run a command. 
> > > But it always fails. I think it fails because I am using Kubuntu which
> > > uses sudo instead of su.
> >
> > KDESu supports sudo for root ....
> >
> > > Here is what I have:
> > >
> > >     if (enableDHCP) {
> > >       KDESu::SuProcess suProcess("david","/sbin/dhclient eth0");
> >
> > shouldn't this be suProcess("root", "/sbin/dhclient eth0") or are you
> > actually
> > trying to run the process as user "david"?
>
> Oh that was a typo here.  Yes I used david and use david's password, as
> this is how sudo works from the command line for me.  I guess I should set
> the password for root as Guillame pointed out in a previosu email.

no, you want to write suProcess("root", "/sbin/dhclient eth0");

that will use sudo to Do The Right Thing; you pass it your password, but it 
will use sudo to make it happen.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech


["signature.asc" (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic