View | Details | Raw Unified | Return to bug 44115
Collapse All | Expand All

(-)server_password_change.d/univention-samba4 (-1 / +6 lines)
 Lines 48-54    Link Here 
48
	%EOF
48
	%EOF
49
49
50
	## 2. replace random machine secret in SAM with /etc/machine.secret
50
	## 2. replace random machine secret in SAM with /etc/machine.secret
51
	samba-tool user setpassword "${hostname}\$" --newpassword="$(cat /etc/machine.secret)"
51
	if [ "$samba4_role" = "RODC" ]; then
52
		old_password=$(tail -1 /etc/machine.secret.old | sed -n 's/[0-9]*: //p')
53
		samba-tool user password -U "${hostname}\$%${old_password}" --newpassword="$(cat /etc/machine.secret)"
54
	else
55
		samba-tool user setpassword "${hostname}\$" --newpassword="$(cat /etc/machine.secret)"
56
	fi
52
}
57
}
53
58
54
if [ "$1" = "postchange" ]; then
59
if [ "$1" = "postchange" ]; then

Return to bug 44115