mirror of
https://github.com/luzifer-docker/sftp-share.git
synced 2024-11-12 21:12:43 +00:00
13 lines
237 B
Bash
13 lines
237 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
ENC_PASS=$(perl -e 'print crypt($ARGV[0], "password")' ${PASS})
|
||
|
|
||
|
if ( id ${USER} ); then
|
||
|
echo "FATAL: User ${USER} already exists"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
useradd -d /data -m -p ${ENC_PASS} -s /bin/false ${USER}
|
||
|
|
||
|
exec /usr/sbin/sshd
|