SLES12 : How to run a process with a specific user?
by akshays from LinuxQuestions.org on (#4VMC3)
I want to run a process with a specific user.
On RHEL 7, I am able to this with:
source /etc/rc.d/init.d/functions
daemon --user=myuser $JAVA_HOME/bin/java -cp $appClassPath $MAIN_CLASS
How can I achieve the same behavior on SLES12? The /etc/rc.d/init.d/functions is not available on SLES12.
Is it possible to achieve same thing without installing any new modules?
EDIT: Actually this script is called from my systemd unit file and must run at the time of boot.


On RHEL 7, I am able to this with:
source /etc/rc.d/init.d/functions
daemon --user=myuser $JAVA_HOME/bin/java -cp $appClassPath $MAIN_CLASS
How can I achieve the same behavior on SLES12? The /etc/rc.d/init.d/functions is not available on SLES12.
Is it possible to achieve same thing without installing any new modules?
EDIT: Actually this script is called from my systemd unit file and must run at the time of boot.