otmfaqForumsBlogsRegister
FAQMembers ListCalendarToday's PostsSearch


 Subscribe Blogs:RSS
 Subscribe Forums:RSS
OTMFAQ Home
OTMFAQ Blogs
OTMFAQ Forums
OTMFAQ Tutorials

OTM SIG
MavenWire


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

Tags: ,

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old December 3rd, 2006, 17:20
chrisplough's Avatar
Site Moderator
 
Join Date: Jun 2006
Location: West Chester, PA
Posts: 847
Blog Entries: 7
Thanks: 53
Thanked 205 Times in 124 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
Rep Power: 10
chrisplough has a spectacular aura aboutchrisplough has a spectacular aura aboutchrisplough has a spectacular aura about
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
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 On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:06.
Copyright © 2008, Open Book Solutions LLC. All rights reserved.

Sponsored by MavenWire - MavenWire.com


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