Just wanted to thank you for this code. I was able to get it working..Much appreciated!!

Originally Posted by redhead
hmm never tried anythign with several conditions in a single if() test, I woud probable use a case statemen.

Code:
case "$organization" in
  "EXAMPLE1" | "example2" )
     echo Please assign a role to this account.
     ;;
  *) # Default behaviour to catch anything else
    /opt/IDEALX/sbin/smbldap-useradd -G 1513,$GUSER,26 \
                   -s /bin/ksh -d /home/operations/$USERNAME -a $USERNAME
    sleep 1
    echo Setting the inital LDAP password for $USERNAME.
    sleep 1
    /opt/IDEALX/sbin/smbldap-passwd $USERNAME
    if [ $? -ne 0 ] ; then
        echo exiting!!!!
        /opt/IDEALX/sbin/smbldap-userdel -r $USERNAME
    fi
    ;;
esac