16 lines
306 B
Bash
16 lines
306 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
VANIKAM_USER=vanikam
|
||
|
|
||
|
export HOME=/home/$VANIKAM_USER
|
||
|
#adduser --disabled-password --shell /bin/bash --home $HOME --uid $USER_ID user
|
||
|
#--uid
|
||
|
|
||
|
if id "$1" &>/dev/null; then
|
||
|
echo "User $VANIKAM_USER exists"
|
||
|
else
|
||
|
useradd -b /home -m -s /bin/bash $VANIKAM_USER
|
||
|
fi
|
||
|
|
||
|
su $VANIKAM_USER -c 'vanikam'
|