[opensuse-factory] run commands as system user
Hi all, How can I run a command as a system user? (because su - systemuser -c "command" doesn't work ...) -- Robert Xu + Linux is awesome; don't doubt what it can do + rxu(at)lincomlinux(dotttttt)org -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
On Sun, 11 Sep 2011 04:02:06 +0530, Robert Xu <rxu@lincomlinux.org> wrote:
Hi all,
How can I run a command as a system user? (because su - systemuser -c "command" doesn't work ...)
did you literally type "su - systemuser"? "systemuser" is supposed to be replaced by the name of your 'systemuser,' usually root. try "su - -c <command>" because leaving the system user's name blank defaults to "root". -- phani. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
On zondag 11 september 2011 00:32:06 Robert Xu wrote:
Hi all,
How can I run a command as a system user? (because su - systemuser -c "command" doesn't work ...)
In the last case you need to have an account systemuser. If you mean to run the account as root replace systemuser with root. -- fr.gr. Freek de Kruijf -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
Hi, su - systemuser -c "command" -s /bin/bash So you are replacing usual for system users /bin/false with /bin/bash just once for this command execution. Regards, Yury 2011/9/11 Robert Xu <rxu@lincomlinux.org>:
Hi all,
How can I run a command as a system user? (because su - systemuser -c "command" doesn't work ...)
-- Robert Xu + Linux is awesome; don't doubt what it can do + rxu(at)lincomlinux(dotttttt)org -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
On Sat, Sep 10, 2011 at 18:54, Yury Tsarev <xnull@opensuse.org> wrote:
Hi,
su - systemuser -c "command" -s /bin/bash
So you are replacing usual for system users /bin/false with /bin/bash just once for this command execution.
Great! Thanks. And no, I was not actually typing systemuser and/or command. Next time I should use $SYSTEMUSER just to avoid confusion... ._. -- Robert Xu + Linux is awesome; don't doubt what it can do + rxu(at)lincomlinux(dotttttt)org -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
On Sun, 11 Sep 2011 05:00:07 +0530, Robert Xu <rxu@lincomlinux.org> wrote:
And no, I was not actually typing systemuser and/or command.
yeah, sorry. that mistake would have been more likely at the forums, which i read together with the mailing lists. shoul pay more attention where i am... -- phani. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
participants (4)
-
Freek de Kruijf
-
phanisvara das
-
Robert Xu
-
Yury Tsarev