Run a Solaris Shell Script as a startup service using specific user credentials

Let me preface - I'm somewhat new to the Unix world.

I am trying to run a Shell script upon boot on some Solaris 10 Systems but I need the scripts to execute in the backgroud as specific users. Is there a simple way to accomplish this ?
walsh_stephenAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Hanno P.S.Connect With a Mentor IT Consultant and Infrastructure ArchitectCommented:
call the script this way:
  su  -  username  -c  "command(s)"
0
 
omarfaridCommented:
You may have a startup script in /etc/rc2.d or /etc/rc3.d

Startup script has the convention of its name starts with S

You many put in the script the command you want, e.g.

su - username -c command
0
 
walsh_stephenAuthor Commented:
That worked as advertized. Thanks!
0
All Courses

From novice to tech pro — start learning today.