12 lines
244 B
Bash
12 lines
244 B
Bash
|
#!/bin/bash
|
||
|
set -e;
|
||
|
|
||
|
echo $SSH_USER:$SSH_PASS
|
||
|
if [ -z `getent passwd $SSH_USER` ]; then useradd $SSH_USER -d /home/user; fi
|
||
|
echo "$SSH_USER:$SSH_PASS" | chpasswd
|
||
|
|
||
|
#echo "/bin/false" | tee -a /etc/shells
|
||
|
usermod $SSH_USER -s /bin/false
|
||
|
|
||
|
exec $@
|