useradd.sh

 


#
### useradd.sh
###
### Add a user.  Need to be root to run.
###
###
###
 
 
 if [ "$1" != "" ]
 then
     username=$1
 else
     echo "Usage: useradd.sh username "
     exit 1
 fi
 
 
 echo "Create user: $username"
 
 useradd -d /export/home/$username -s /bin/ksh -c "$username" -g stage $username 
 
 
 passwd $username
 
 
 mkdir /export/home/$username
 cp /export/home/map/.profile /export/home/$username
 chmod 755 /export/home/$username 
 chown $username /export/home/$username 
 chown $username /export/home/$username/.profile