#!/bin/bash USER="$1" HDIR="{{ r_connector_usershome }}/$USER" if [ -d $HDIR ] ; then #echo "user dir exist" exit 0 else if id -u $USER >/dev/null 2>&1 then #"echo "ldap user first login" /bin/su - $USER exit 0 else #echo "user does not exist and is not ldap" /usr/sbin/useradd -m -s /bin/false $USER fi fi