Re: bash script kdesu root privilege problem

Jeff Adams <[email protected]> Mon, 25 Feb 2008 19:48:13 -0500
Newsgroups gmane.comp.kde.k3b
Message-ID <[email protected]>
Todd;

Also, check for .profile, .login, .bash_profile, .bash_login in your
home directory. Those can override the /etc/profile settings.

Also, depending on what GUI you're using, check the path for the
GUI configuration. I believe this is in the control center for KDE.
Not sure whre on Gnome.

Jeff


On Monday 25 February 2008 02:29:26 pm Todd and Margo Chester wrote:
> Todd and Margo Chester wrote:
> >> On Sunday 17 February 2008 05:19:57 pm Todd and Margo Chester wrote:
> >>> Hi All,
> >>>
> >>> I am using k3b-0.12.17-1.el5 on CentOS 5.1 (RHEL 5.1 clone).
> >>>
> >>> I can run k3b as any user and as root perfectly.
> >>>
> >>> But, when I run K3B from a bash script as
> >>> a user and try to elevate k3b to get root privileges,
> >>>
> >>>      #! /bin/bash
> >>>       kdesu -n -u root -c "k3b --nofork"
> >>>
> >>> I get all kinds of the following errors:
> >>>
> >>>          Unable to find growisofs executable
> >>>          K3b uses growisofs to actually write dvds.
> >>>          Without growisofs you won't be able to write
> >>>          dvds. Make sure to install at least version
> >>>          5.10.  Solution: Install the dvd+rw-tools package.
> >>>
> >>> What am I doing wrong?
> >>>
> >>> Many thanks,
> >>> -T
> >>> p.s. sudo does not work either
> >
> > Jeff Adams wrote:
> >  > Todd;
> >  >
> >  > Check the default path for bash in /etc/profile.
> >  > I suspect it does not contain the location where growisofs is located.
> >  >
> >  > Jeff
> >
> > Hi Jeff,
> >
> >     You called it.  Added "/usr/bin" to /etc/profile and
> > that did the trick.  Thank you!
> >
> > -T
>
> Oh poop!  Spoke too soon.  The above modification to /etc/profile
> fixed running from the command line, but not from a bash
> script.
>
> Somewhere I remember there is a different path scheme for
> interactive command (the command line) and non-interactive
> scripts (bash scripts).  Any idea how to fix the non-interactive
> path?
>
> Many thanks,
> -T
>
> p.s. k3b is in /usr/bin.  And so is everything else it can't
> find.  What a pain!



-- 
Jeff Adams
[email protected]
(508)944-4821  Cell


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/