Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

startup script running as "user"

Status
Not open for further replies.

De8o

Technical User
Sep 26, 2000
70
US
We have a script that needs to be run on startup. I've created a custom script and enabled it using chkconfig for runlevels 3,4,5. However this script needs to be run as a user mqm. How can I do this, qas thinking along the lines of SUID. Any help would be appreciated.

Darren
 

su - mqm -c /name/of/script

Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
In your startup script you probably want to start the Queue Manager, so this is a typical entry in the script:

/bin/su - mqm -c "strmqm Your_QM_Name"

Your alternative is to add user root to the mqm group if security isn't a real issue, then root can start/stop the QM plus all other MQ related commands.

IBM Certified Confused - MQSeries
IBM Certified Flabbergasted - AIX 5 pSeries System Administration
MS Certified Windblows Rebooter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top