mirror of
https://github.com/luzifer-docker/sftp-share.git
synced 2024-12-20 22:11:16 +00:00
11 lines
315 B
Bash
11 lines
315 B
Bash
#!/bin/bash
|
|
|
|
if ( id ${USER} ); then
|
|
echo "INFO: User ${USER} already exists"
|
|
else
|
|
echo "INFO: User ${USER} does not exists, we create it"
|
|
ENC_PASS=$(perl -e 'print crypt($ARGV[0], "password")' ${PASS})
|
|
useradd -d /data -m -p ${ENC_PASS} -u ${USER_UID} -s /bin/sh ${USER}
|
|
fi
|
|
|
|
exec /usr/sbin/sshd -D
|