[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] Adjust Samba account related code in share/debian-edu-config/tools/gosa-sync

Wolfgang Schweer gitlab at salsa.debian.org
Wed Oct 28 13:53:34 GMT 2020



Wolfgang Schweer pushed to branch master at Debian Edu / debian-edu-config


Commits:
e7f88ec9 by Wolfgang Schweer at 2020-10-28T14:50:30+01:00
Adjust Samba account related code in share/debian-edu-config/tools/gosa-sync

This fixes the login for new users.

Signed-off-by: Wolfgang Schweer <wschweer at arcor.de>

- - - - -


2 changed files:

- debian/changelog
- share/debian-edu-config/tools/gosa-sync


Changes:

=====================================
debian/changelog
=====================================
@@ -5,6 +5,8 @@ debian-edu-config (2.11.34) UNRELEASED; urgency=medium
       will be used as domain name).
     - Add ntlm auth stanza to share/debian-edu-config/smb.conf.edu-site (case
       restricted setting 'ntlm auth = mschapv2-and-ntlmv2-only').
+  * share/debian-edu-config/tools/gosa-sync: Adjust Samba account related code
+    introduced in d-e-c 2.11.33.
 
  -- Wolfgang Schweer <wschweer at arcor.de>  Tue, 27 Oct 2020 16:28:48 +0100
 


=====================================
share/debian-edu-config/tools/gosa-sync
=====================================
@@ -44,17 +44,16 @@ IAM=`ldapwhoami -x -Z -y "$TMPFILE" -D "$USERDN" 2>/dev/null || true`
 
 # Escapes " because kadmin needs to use double quotes:
 EUSERPASSWORD="$(cat $TMPFILE | sed -e 's/\"/\\\"/g')"
-SAMBAPASSWORD=$EUSERPASSWORD
 
 if [ "$IAM" = "dn:$USERDN" ] ; then
+	(echo $EUSERPASSWORD; echo $EUSERPASSWORD) | smbpasswd -a -s $USERID
+	logger -t gosa-sync -p notice "Sucessfully added / changed Samba acount for '$USERID'."
     cat > "$TMPFILE" <<EOF
 change_password -pw "$EUSERPASSWORD" $USERID
 EOF
 	RET=$((cat "$TMPFILE" | kadmin.local 1> /dev/null) 2>&1)
 	if [ -z "$RET" ] ; then
 		logger -t gosa-sync -p notice "Sucessfully changed kerberos password for '$USERID'."
-		(echo $SAMBAPASSWORD; echo $SAMBAPASSWORD) | smbpasswd -a -s $USERID
-		logger -t gosa-sync -p notice "Sucessfully added Samba acount for '$USERID'."
 	else
 		logger -t gosa-sync -p warning "$RET"
 		echo "$RET"



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/e7f88ec9f35f7aea14b5271e19469171eb2da3b3

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/commit/e7f88ec9f35f7aea14b5271e19469171eb2da3b3
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20201028/8e7413bd/attachment-0001.html>


More information about the debian-edu-commits mailing list