Clustering

Sudoers File editing

When you are administering a cluster you will need sudo permission, even with passwordless SSH you will find that some operations will require a password for usage and authentication, ie admin scripts on the nodes. there are two ways to get around this

  1. Redirection
    1. Create a file with your password in your home directory, make it rwx only for you ie chmod ou-rwx <password file>
    2. in your admin script redirec the passwor call in the ssh command call
      1. ssh felcl${num} sudo shutdown -h now < ~/psswd &
    3. this will redirect and enter the pasword to all of the nodes that you are trying to access as sudoer.
  2. Sudoers file
    1. The cleaner method is to create a sudoers file and allow the admins passworless sudo access
    2. You may think oh that easy, but the problem is that OS X sudoers file is not standard and dosent behave properly.
    3. after much experimentation and trial and error here is the proper /etc/sudoers file settings.

 

# 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

# Defaults specification

# User privilege specification

%admin ALL= NOPASSWD: ALL


This will allow everyone in the admin group to perform cross node sudo commands withough having to enter passwords.

 

About Me | Site Map | | ©2006 Eric Adint