$ sux -m -c kate edit
getent: invalid option -- c
Try `getent --help' or `getent --usage' for more information.
WARNING: --preserve-environment has been set, but no good value was found for XAUTHORITY, expect trouble
Unknown id: eval $TERM; exec env TERM='xterm' DISPLAY=':0' "kate" "edit";
$ sux --help
Usage: su [options] [LOGIN]
Options:
-c, --command COMMAND pass COMMAND to the invoked shell
-h, --help display this help message and exit
-, -l, --login make the shell a login shell
-m, -p,
--preserve-environment do not reset environment variables, and
keep the same shell
-s, --shell SHELL use SHELL instead of the default in passwd
So, I need to run a command w/ sux - and not to use a shell for the user and then run the program - as the sux command is being run from a script and therefore nobody can enter command once a shell has been started.
Thanks for Your time.
PS Please, reply to the list.
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
01-04-2010, 10:55 AM
Clive Standbridge
'sux -c program username' does not work.
Hi Stu,
> $ sux -c kate edit
> Unknown id: eval $TERM; exec env TERM='xterm' DISPLAY=':0'
> "kate" "edit";
>
> $ sux -m -c kate edit
> getent: invalid option -- c
> Try `getent --help' or `getent --usage' for more information.
> WARNING: --preserve-environment has been set, but no good value was
> found for XAUTHORITY, expect trouble
> Unknown id: eval $TERM; exec env TERM='xterm' DISPLAY=':0'
> "kate" "edit";
>
> $ sux --help
> Usage: su [options] [LOGIN]
It looks like --help is passed through to su. Try
$ sux '-?'
usage: sux [-m|-p|--preserve-environment]
[--display display]
[--no-cookies|--copy-cookies|--use-xauthority]
[--untrusted] [--timeout x]
[-] [username [command]]
So you would need
$ sux root kate
As an alternative, set up sudo and run
$ sudo kate
Or for the specific case of running an editor, use sudoedit with your
chosen editor in the EDITOR environment variable e.g.
export EDITOR=kate
$ sudoedit filename
I hope this helps.
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
01-04-2010, 11:01 AM
Clive Standbridge
'sux -c program username' does not work.
On Mon 4 Jan 2010 11:55:02 +0000(+0000), Clive Standbridge wrote:
> Hi Stu,
Sorry I misspelled Sthu.
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
01-05-2010, 03:45 PM
Sthu Deus
'sux -c program username' does not work.
Thank You for Your time and answer, Clive:
>It looks like --help is passed through to su. Try
>$ sux '-?'
>usage: sux [-m|-p|--preserve-environment]
> [--display display]
> [--no-cookies|--copy-cookies|--use-xauthority]
> [--untrusted] [--timeout x]
> [-] [username [command]]
Wow! Never would guess myself!
>So you would need
>$ sux root kate
So easy!
>As an alternative, set up sudo and run
>$ sudo kate
No. I need to run it under another user (edit, in my case).
>I hope this helps.
It did.
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
01-05-2010, 03:47 PM
Sthu Deus
'sux -c program username' does not work.
Thank You for Your time and answer, Clive:
>Sorry I misspelled Sthu.
That's OK.
Thank You for Your answer, once again!
--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org