Unix Technical Forum

Start a process as boot with username != root

This is a discussion on Start a process as boot with username != root within the Sun Solaris Administration forums, part of the Solaris Operating System category; --> I want to start 'Tomcat' at boot time with a username of tomcat and not root. How can I ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > Sun Solaris Administration

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 10:01 AM
Dave
 
Posts: n/a
Default Start a process as boot with username != root

I want to start 'Tomcat' at boot time with a username of tomcat and not
root. How can I do this? I was thinking of doing it via ssh

ssh tomcat@locahost:/uss/local ..../startup.sh

with password less public-key/private-key

but there must be a more sensible way.
--
Dave K

http://www.southminster-branch-line.org.uk/

Please note my email address changes periodically to avoid spam.
It is always of the form: month-year@domain. Hitting reply will work
for a couple of months only. Later set it manually. The month is
always written in 3 letters (e.g. Jan, not January etc)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2008, 10:01 AM
Torsten Kirschner
 
Posts: n/a
Default Re: Start a process as boot with username != root

On Sun, 04 Dec 2005 13:16:03 +0000, Dave wrote:

> I want to start 'Tomcat' at boot time with a username of tomcat and not
> root. How can I do this? I was thinking of doing it via ssh
>
> ssh tomcat@locahost:/uss/local ..../startup.sh
>
> with password less public-key/private-key
>
> but there must be a more sensible way.


If you download the Tomcat5 package from blastwave.org, its
/etc/init.d/cswtomcat5 script will illustrate how to run tomcat as a
dedicated user.

In short, it involves things like
....
case $1 in
'start')
/bin/su $TOMCAT_USER -c $CATALINA_HOME/bin/startup.sh
;;
....
and
# TOMCAT_USER
#
# TOMCAT_USER variable defines the Solaris user running the
# tomcat server. You can supered the default valude in the
# tomcat5 configuration file. The value of this variable must
# be a valid Solaris user (ie: root, nobody). The default value
# is root.
#
# WARNING : By default the directory permissions are set for
# the root user (no write access for 'nobody').
# The logs are stored in /opt/csw/share/tomcat5/logs, and do belong
# to root user. If you change the TOMCAT_USER, be sure that this
# user can write in the log directory.
#
# The following permissions may also have to be changed :
# . give read access to the conf directory and all its subdirs
# . give write access to the conf dir to let tomcat create new files
# . give write access to the work dir
#
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:25 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com