2013-03-24 14:39:41 +01:00
#!/bin/bash
2013-03-31 22:19:11 +02:00
NMEUSR = $1
EMLUSR = $2
GRPUSR = $3
ADDUSR = " $( which useradd) -m -G "
if [ " $NMEUSR " = "" ] ; then
echo -e " \nUSAGE: ffuseradd <USERNAME>... [EMAIL ADDRESS]... [GROUP]... \nUsername is\
necessary!\n Email address and group are optional.\n Groups for example: sudo,www-user. Ever add multible groups \" ,\" separated! Leave it blank for standard user."
exit
2013-03-24 14:39:41 +01:00
else
2013-03-31 22:19:11 +02:00
if [ " $EMLUSR " = "" ] ; then
echo -e "You entered username:\n Username: " $NMEUSR "\n Email address: none"
2013-03-24 14:39:41 +01:00
else
2013-03-31 22:19:11 +02:00
echo -e "You entered username:\n Username: " $NMEUSR "\n Email address: " $EMLUSR ""
2013-03-24 14:39:41 +01:00
fi
fi
2013-03-31 22:19:11 +02:00
# Adding user
echo -e "\nadding user " $NMEUSR " with " $ADDUSR ""
echo $GRPUSR