Hi,
With your suggestion the user part falls away and all the following work
fine
su --c "shutdown -r now"
su -c " cp foo foo1"
su -c "rm -ir tmp"
Well if you know its easy - couldnot see this option in man page.
Thanks
enjoy
Johan

*******************
----- Original Message ----- 
From: "Adolfo Bello" <[EMAIL PROTECTED]>
To: "Mandrake-Newbie" <[EMAIL PROTECTED]>
Sent: Sunday, July 06, 2003 10:54 PM
Subject: Re: [newbie] superuser single command (su -c ??????????)


> On Sun, 2003-07-06 at 16:20, Johan Scheepers wrote:
> > Hi,
> > Sometimes while  being a user you need to do a command that only su can
do.
> > While stdying su it seems there is a way to do this. I have problems to
make
> > some work.
> >
> > su -c gedit root foo
> >   opens gedit in su mode not as foo but as untitled - you can save it as
> > foo.
> >
> > su -c ./foo root
> > This runs the script.
> >
> > su -c cp root foo foo1
> > this does not work - complains and needs more than I can provide - do
not
> > know what.
> >
> > su -c shutdown root -r now
> > Does not work - complains -r wrong option.
> >
> > now su command construction something like this...
> > su [option] [-] [user] [ARG]
> >
> > It would be really nice to do complex commands.
> > Please what am I missing
> > Thanks
> > Johan
> >
> > May this be a good day for learning
>
> Try:
>
> su -c 'your command within quotes'
>
> Adolfo
>
>
>


----------------------------------------------------------------------------
----


> Want to buy your Pack or Services from MandrakeSoft?
> Go to http://www.mandrakestore.com
>


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to