In Solaris how do you startup a script automatically without user input?

0

I'm using Oracle Solaris, and i would like to startup a script automatically everytime i turn on my computer and log into the desktop, however the script i want to run requires elevated permission, so i have to use SU to run the script.

is there anyway to do this without user input?

reyes

Posted 2012-05-15T23:13:10.663

Reputation: 117

please accept one of the answers below, or provide comments on what else you need. – Yedric – 2012-09-27T16:40:51.130

Answers

0

By noting "Oracle Solaris," I'm assuming you're using v11 or v10.

Easiest way is to add your startup script into the run levels. ie: install script in /etc/init.d and hardlink to something in /etc/rc3.d.

And if you're using v10 or v11, you could use SMF instead of the runlevels.

sleepyweasel

Posted 2012-05-15T23:13:10.663

Reputation: 101

0

Install sudo and configure it to allow you to run this one particular script without a password.

Kyle Jones

Posted 2012-05-15T23:13:10.663

Reputation: 5 706

0

Use RBAC which is part of Solaris unlike sudo which is only included starting from Solaris 11. It allows you to run a script as root without providing a password. Solaris provides fine grain privileges so only granting the one(s) really needed by your script would be more secure.

jlliagre

Posted 2012-05-15T23:13:10.663

Reputation: 12 469