make normal user, allow ssh login

This commit is contained in:
Praveen Arimbrathodiyil 2016-01-15 23:46:32 +05:30
parent 8f191e58a6
commit 6db7d7c211

10
debian/adduser.sh vendored
View file

@ -5,15 +5,9 @@
user=gitlab
echo "Creating/updating $user user account..."
adduser --system --home /usr/share/$user \
--gecos "$user system user" --shell /bin/sh \
--quiet --disabled-password --disabled-login $user || {
adduser --home /usr/share/$user --gecos "$user user" --shell /bin/sh \
--quiet --disabled-password $user || {
# adduser failed. Why?
if [ `getent passwd $user|awk -F ':' '{print $3}'` -gt 999 ] >/dev/null ; then
echo "Non-system user $user found. I will not overwrite a non-system" >&2
echo "user. Remove the user and reinstall diaspora." >&2
exit 1
fi
# unknown adduser error, simply exit
exit 1
}