#!/bin/sh

export LANG=C
ENV_HOME=/usr/local/baropam/radius;
ACC_HOME=/Users/$1

userdel -rf $1
\rm ${ENV_HOME}/.$1_auth

#useradd -d ${ACC_HOME} -m --badnames -s /bin/bash $1
useradd -d ${ACC_HOME} -m -s /bin/bash $1
echo "$1:$2" | chpasswd

\cp ${ENV_HOME}/.baro_auth ${ENV_HOME}/.$1_auth

sed -i "s/01012341234/$3/g" ${ENV_HOME}/.$1_auth


