'sux -c program username' does not work.
Good day.
I ask for Your help in running of a program using sux.
Here several my vain tryings and its outputs - hope it will explain the situation itself.
$ 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]
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.
Reply to: