otmfaqForumsBlogsRegister
FAQMembers ListCalendarToday's PostsSearch


 Subscribe Blogs:RSS
 Subscribe Forums:RSS
 Follow New Posts:Twitter
OTMFAQ Home
OTMFAQ Blogs
OTMFAQ Forums
OTM Wiki

OTM SIG
OTM Wiki
MavenWire


SysAdmin and Management Managing and monitoring OTM / G-Log and other administrative activities.

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old December 3rd, 2006, 16:20
chrisplough's Avatar
Site Moderator
 
Join Date: Jun 2006
Location: West Chester, PA
Posts: 1,167
Blog Entries: 8
Groans: 0
Groaned at 1 Time in 1 Post
Thanks: 142
Thanked 256 Times in 159 Posts
Rep Power: 10
chrisplough is a jewel in the roughchrisplough is a jewel in the roughchrisplough is a jewel in the rough
Send a message via AIM to chrisplough
[SOLVED] Using sudo with OTM

Using sudo is a great way to maintain the security of your servers while allowing application admins or implementation consultants to restart OTM as necessary. Since restarts happen frequently during implementations, giving your users this ability can help considerably - especially as the project deadlines approach!

The main restart scripts for OTM are usually:
(note: the path may differ depending on your OS - specifically HPUX and AIX)
/etc/init.d/otmweb55
/etc/init.d/otmapp55
/etc/init.d/otmrptweb55
The OTM user for this example is imaginatively named "otm55".

First, ensure that the sudo package is installed on your server. If you're running Red Hat Linux, you simply need to run:

Code:
up2date -i sudo
For CentOS, run:

Code:
yum install -y sudo
Next, run:

Code:
visudo
and ensure your sudoers configuration file looks similar to the following:

Code:
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification
Cmnd_Alias      OTM55SCRIPTS = /etc/init.d/otmweb55, /etc/init.d/otmapp55, /etc/init.d/otmrptweb55

# Defaults specification

# User privilege specification
root    ALL=(ALL) ALL
otm55 ALL=NOPASSWD:OTM55SCRIPTS
Thats it! Now you can test by logging in as the "otm55" user and running:

Code:
sudo /etc/init.d/otmweb55 stop
sudo /etc/init.d/otmweb55 start
Finally, if you want to make things super easy, just create a quick restart script that looks like the following:

Code:
#!/bin/sh

echo --- OTM Restart begun: `date`
sudo /etc/init.d/otmrptweb55 stop
sudo /etc/init.d/otmweb55 stop
sudo /etc/init.d/otmapp55 stop
sleep 10
sudo /etc/init.d/otmapp55 start
sudo /etc/init.d/otmweb55 start
sudo /etc/init.d/otmrptweb55 start
 echo --- OTM Restart finished: `date`
I hope this helps!

--Chris
__________________
Chris Plough
MavenWire

www.MavenWire.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread


Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:23.
Copyright © 2006-2009, Open Book Solutions LLC. All rights reserved.


Inactive Reminders By Icora Web Design

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40