some changes on ffuseradd.sh but not ready yet... HAPPY EASTERDAYS! (but no
eastereggs included)
This commit is contained in:
parent
eee0a5a8b6
commit
3ab1ba0d21
23
ffuseradd.sh
23
ffuseradd.sh
|
@ -1,12 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$1" = "" ]; then
|
||||
echo -e "\nUSAGE: ffuseradd <USERNAME>... [EMAIL ADDRESS]...\nUsername is\
|
||||
necessary!\nEmail address is optional."
|
||||
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!\nEmail address and group are optional.\nGroups for example: sudo,www-user. Ever add multible groups \",\" separated! Leave it blank for standard user."
|
||||
exit
|
||||
else
|
||||
if [ "$2" = "" ]; then
|
||||
echo -e "You entered username:\n Username:"$1"\n Email address: none"
|
||||
if [ "$EMLUSR" = "" ]; then
|
||||
echo -e "You entered username:\n Username: "$NMEUSR"\n Email address: none"
|
||||
else
|
||||
echo -e "You entered username:\n Username:"$1"\n Email address: "$2""
|
||||
echo -e "You entered username:\n Username: "$NMEUSR"\n Email address: "$EMLUSR""
|
||||
fi
|
||||
fi
|
||||
|
||||
# Adding user
|
||||
echo -e "\nadding user "$NMEUSR" with "$ADDUSR""
|
||||
echo $GRPUSR
|
||||
|
|
Loading…
Reference in a new issue