[debian-lan-devel] [SCM] Debian-LAN development and packaging branch, master, updated. 0.8-9-g52dded8
Andreas B. Mundt
andi at debian.org
Sun Mar 24 18:10:31 UTC 2013
The following commit has been merged in the master branch:
commit f153ecf2ec53fcd648dad836030e099ec0eb4720
Author: Andreas B. Mundt <andi at debian.org>
Date: Sat Mar 23 17:49:42 2013 +0100
Fetch home dir permissions from 'adduser.conf' in gosa-create.
When creating a user with GOsa, the default home directory permissions
are fetched from 'adduser.conf' as it is done for all other tools that
migt be used to add a user account.
diff --git a/fai/config/files/usr/local/sbin/gosa-create/GOSA b/fai/config/files/usr/local/sbin/gosa-create/GOSA
index 4ebe7aa..1af8107 100755
--- a/fai/config/files/usr/local/sbin/gosa-create/GOSA
+++ b/fai/config/files/usr/local/sbin/gosa-create/GOSA
@@ -14,6 +14,8 @@ set -e
PREFIX=/lan
HOSTNAME=$(hostname -s)
USERID=$1
+## Fetch home dir permissions from 'adduser.conf':
+eval $(grep "^DIR_MODE" /etc/adduser.conf)
#FIXME Change this ldap search to only find new users, to not slow down as more users are added.
# One ide might be to look for objects without the krbPasswordExpiration attributes.
@@ -37,6 +39,7 @@ while read KEY VALUE ; do
nscd -i group
fi
chown -R $USERID:$GROUPID $HOMEDIR
+ chmod $DIR_MODE $HOMEDIR
kadmin.local -q "add_principal -randkey -x $USERDN $USERID"
logger -t gosa-create -p notice Home directory \'$HOMEDIR\' and principal \'$USERID\' created.
## send a welcome-email:
--
Debian-LAN development and packaging
More information about the debian-lan-devel
mailing list