#!/bin/sh
 
ADMIN_USER=admin
ID_LINE=`/usr/bin/id -P $1`
 
#GROUP=`echo "${ID_LINE}"| /usr/bin/cut -f 4 -d":"` 
HOME=`echo "${ID_LINE}"| /usr/bin/cut -f 9 -d":"`

if [ "$1" = "root" -o "$1" = "${ADMIN_USER}" ]
then
        exit 0
fi

if [ ! -d "${HOME}" ]
then
#   echo "${HOME} is not found."
   /usr/sbin/createhomedir -c -u $1
   exit 0
fi

