Installing Eclipse & VMWare Studio Explorer on Mac OSX Lion

Older version of the Mac OS require you to make a visit to Apple’s development site and download a JDK, but if you have Lion then you simply need to choose the proper download from the Eclipse Site.  I used Eclipse Classic 3.7.2.

  1. Visit the Eclipse Download Site and grab Eclipse Classic.
  2. It comes as a tar.gz file.  Expand it an place it in you Applications directory.
  3. Double-click on the Eclipse Application.
  4. “Preferences | Install/Update | Available Software Sites” and choose “Add”
  5. Enter the location of your http://10.1.1.101/eclipse/update and give it a name like “VMWare VM Studio”
  6. Click the “Reload” button.  If your new site is properly setup it should come back error free and you can close that dialog.
  7. Click “Help | Install New Software…” and use the drop down to select your new site.
  8. Use the triangle to explore the available software, choose “VMWare Studio Plugin for Eclipse” and select the “Next” button.
  9. After working out all the dependencies, the installer will require you to accept a licensing agreement.  Click “Finish” when done.
  10. Select “Window | Show View | Other” and locate your VMware Studio Explorer.  Select it and click okay.
  11. You will have to restart Eclipse.

Once it comes back you will have a new explorer tab and a fine place to administer the VMware Studio from.

 

 

Building a NIS User Add Script

I have an environment where Solaris provides NIS for all the Solaris and Linux systems.  Every time I add a user I’ve had to alter a number of files and that’s pretty lame.

If you have any questions please ask.

#!/bin/bash
###################
# NewUser.sh creates a new user in the NIS environment and pushes that
# user information out to the server systems.
#
# NewUser.sh v1.0 - jay@zidea.com
#
###################
### Declarations
declare -rx SCRIPT=${0##*/}
declare USERNAME
declare FULLNAME
declare PASSWORD
declare USER_HOME
declare LASTID
declare USERID
### Checks if you have the right privileges
if [ "$USER" = "root" ]
then
#### Collect the variables
echo "" ;echo "" ;echo "" ;echo ""
 printf "%s\n" "Enter the user's name (firstname lastname): "
 echo "" ;echo "" ;echo "" ;echo ""
 read -e FULLNAME
printf "%s\n" "Enter the USERNAME (8 characters or less): "
 echo "" ;echo "" ;echo "" ;echo ""
 read -e USERNAME
# Other variables
USER_HOME="/home/$USERNAME"
 LASTID=`tail -1 /etc/passwd |cut -f3 -d:`
 USERID=`expr $LASTID + 1`
# Checks if the user already exists
 cut -d: -f1 /etc/passwd | grep "$USERNAME" > /dev/null
 OUT=$?
# Test for the account and build the files
 if [ $OUT -eq 0 ];then
 echo >&2 "ERROR: User account: \"$USERNAME\" already exists."
 echo >&2 "ERROR: User account: \"$USERNAME\" already exists." >> "$LOGFILE"
 else
 # Create a new user /usr/sbin/useradd
 /usr/sbin/useradd -u $USERID -d $USER_HOME -g staff -s /bin/bash -c "$FULLNAME" -m $USERNAME
 passwd $USERNAME
 PASSWORD=`grep $USERNAME /etc/shadow | cut -f2 -d:`
 echo $USERNAME:x::::: >> /etc/nis_etc/security/passwd.adjunct
 echo $USERNAME:$PASSWORD:$USERID:10:"$FULLNAME":$USER_HOME:/bin/bash >> /etc/nis_etc/passwd
 echo $USERNAME:$PASSWORD:14785:::::: >> /etc/nis_etc/shadow
# Restart the Yellow Pages (NIS)
 pushd /var/yp
 make
 popd
# Setup the $HOME Directory on svnfiles
 ssh root@home.server.com mkdir -pv /files/$USERNAME
 ssh root@home.server.com chown -R $USERID /files/$USERNAME
 ssh root@home.server.com chgrp -R wheel /files/$USERNAME
echo "The user \"$USERNAME\" has been created."
 fi
 exit 0
else
 echo >&2 "ERROR: You must be a root user to execute this script."
 exit 1
fi