Commit ce6d6953 authored by Paul Cammish's avatar Paul Cammish

Merge branch 'issue271_buster' into 'buster-testing'

Add sympl user to relevant groups on each install (buster)

Fixes issue #271

See merge request !155
parents 1361c426 b04f6da8
Pipeline #758 passed with stages
in 37 minutes and 35 seconds
......@@ -2,8 +2,10 @@ CHANGELOG
---------
2019-12-16
sympl-core
* Add sympl user to relevant groups on each install.
sympl-web
* Added cron to clean up old PHP sessions
* Added cron to clean up old PHP sessions.
2019-12-05
sympl-core
......
sympl-core (10.0.191216.0) stable; urgency=medium
* Add sympl user to relevant groups on each install.
-- Paul Cammish <sympl@kelduum.net> Mon, 16 Dec 2019 12:22:03 +0000
sympl-core (10.0.191205.0) stable; urgency=medium
* Updated IPv6 Only workaround.
......
......@@ -34,7 +34,7 @@ fi
shadowconfig on
#
# If there isn't a Sympl account, add it.
# If there isn't a Sympl account, add it with password/keys from root.
#
if ( ! grep ^sympl: /etc/passwd 2>/dev/null >/dev/null ); then
......@@ -54,21 +54,23 @@ if ( ! grep ^sympl: /etc/passwd 2>/dev/null >/dev/null ); then
chown sympl:sympl /home/sympl/.ssh/authorized_keys
fi
#
# If we have an adm group - which we should - add the Sympl user to it.
#
if ( getent group adm >/dev/null ); then
adduser sympl adm
fi
#
# Ensure the Sympl user is added to the www-data group too
#
if ( getent group www-data >/dev/null ); then
adduser sympl www-data
fi
#
# Check that the adm and www-data groups exist, then add the sympl user to them
# Fixes Issue #271, where the Sympl user already exists.
#
for GROUP in adm www-data ; do
if ( getent group $GROUP >/dev/null ); then
if [ $( id sympl | grep -c "($GROUP)" ) == 0 ]; then
adduser sympl $GROUP
fi
fi
fi
done
#
# Add a stat override for the /srv directory.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment