Doorparty setup fixes and creating users
This commit is contained in:
parent
ec80048e19
commit
e2c81af094
@ -101,6 +101,7 @@ ENV SBBSEXEC=/opt/sbbs/exec
|
|||||||
ENV PATH=$PATH:${SBBSEXEC}
|
ENV PATH=$PATH:${SBBSEXEC}
|
||||||
|
|
||||||
COPY start.sh ${SBBSEXEC}/
|
COPY start.sh ${SBBSEXEC}/
|
||||||
|
COPY doorparty.sh ${SBBSEXEC}/
|
||||||
COPY main.cnf /opt/sbbs/ctrl.orig/
|
COPY main.cnf /opt/sbbs/ctrl.orig/
|
||||||
COPY sshd_config /opt/sbbs/ctrl.orig/
|
COPY sshd_config /opt/sbbs/ctrl.orig/
|
||||||
|
|
||||||
|
21
doorparty.sh
Executable file
21
doorparty.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
GROUP=doorparty
|
||||||
|
GID=1000
|
||||||
|
USERS=${SBBSCTRL}/doorparty-connector.users
|
||||||
|
|
||||||
|
if ! grep -qe ^${GROUP}: /etc/group; then
|
||||||
|
echo true
|
||||||
|
groupadd -g ${GID} ${GROUP}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -r ${USERS} ]; then
|
||||||
|
cat ${USERS} | while read line; do
|
||||||
|
user=$(echo ${line}|awk -F: '{print $1}')
|
||||||
|
if ! grep -qe ^${user}: /etc/passwd; then
|
||||||
|
echo "+ Adding Door Party User: ${user}"
|
||||||
|
useradd -c "Door Party User" -g ${GROUP} -MN -s /usr/sbin/nologin ${user}
|
||||||
|
echo -n $line | chpasswd
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
@ -42,10 +42,6 @@ PubkeyAuthentication no
|
|||||||
#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
|
#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
|
||||||
|
|
||||||
#AuthorizedPrincipalsFile none
|
#AuthorizedPrincipalsFile none
|
||||||
AuthorizedKeysCommand /opt/sbbs/mods/ssh.sh
|
|
||||||
AuthorizedKeysCommandUser nobody
|
|
||||||
AuthorizedPrincipalsCommand /opt/sbbs/mods/ssh.sh
|
|
||||||
AuthorizedPrincipalsCommandUser nobody
|
|
||||||
|
|
||||||
#AuthorizedKeysCommand none
|
#AuthorizedKeysCommand none
|
||||||
#AuthorizedKeysCommandUser nobody
|
#AuthorizedKeysCommandUser nobody
|
||||||
@ -130,4 +126,4 @@ AcceptEnv LANG LC_*
|
|||||||
# PermitTTY no
|
# PermitTTY no
|
||||||
# ForceCommand cvs server
|
# ForceCommand cvs server
|
||||||
#DisableForwarding yes
|
#DisableForwarding yes
|
||||||
PermitOpen 127.0.0.1:513
|
PermitOpen haproxy_tcp:513
|
||||||
|
Loading…
Reference in New Issue
Block a user