First check in

This commit is contained in:
2016-10-04 08:51:34 -05:00
commit 9b4a197003
7 changed files with 207 additions and 0 deletions

35
SNAP/usher Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/bash
case $1 in
preinst)
exit 0
;;
postinst)
if ! getent group sshd 2>&1 > /dev/null; then
if groupadd -g 50 sshd; then
echo 'Created group sshd'
else
echo 'Failed to create group sshd!'
exit 1
fi
fi
if ! getent passwd sshd 2>&1 > /dev/null; then
if useradd -c 'sshd PrivSep' -d /var/lib/sshd -g sshd \\
-s /bin/false -u 50 sshd; then
echo 'Created user sshd'
else
echo 'Failed to create user sshd!'
exit 1
fi
fi
chown -v root:root /var/run/sshd
;;
prerm)
exit 0
;;
postrm)
exit 0
;;
esac