Univention Bugzilla – Attachment 7565 Details for
Bug 36570
Windows Client SIDs not synchronized to OpenLDAP
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
fix-sambasid.sh
fix-sambasid.sh (text/x-sh), 1.04 KB, created by
Arvid Requate
on 2016-03-29 18:34:29 CEST
(
hide
)
Description:
fix-sambasid.sh
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2016-03-29 18:34:29 CEST
Size:
1.04 KB
patch
obsolete
>#!/bin/bash > >ldif=$(univention-ldapsearch -xLLL sambaSID="S-1-4-*" uid sambaSID uidNumber) > >while read -d $'\0' record; do > if [ -z "$record" ]; then > continue > fi > uid=$(sed -n 's/^uid: //p' <<<"$record") > > ldif=$(ldbsearch -H /var/lib/samba/private/sam.ldb \ > sAMAccountName="$uid" objectSid) > objectSid=$(sed -n 's/^objectSid: //p' <<<"$ldif") > if [ -z "$objectSid" ]; then > continue > fi > > ldif=$(ldbsearch -H /var/lib/samba/private/idmap.ldb \ > objectSid="$objectSid" xidNumber) > xidNumber=$(sed -n 's/^xidNumber: //p' <<<"$ldif") > > oldn=$(sed -n 's/^dn: //p' <<<"$record") > sambaSID=$(sed -n 's/^sambaSID: //p' <<<"$record") > uidNumber=$(sed -n 's/^uidNumber: //p' <<<"$record") > > echo "dn: $oldn" > echo "uid: $uid" > echo "sambaSID: $sambaSID" > echo "objectSid: $objectSid" > echo "uidNumber: $uidNumber" > echo "xidNumber: $xidNumber" > echo > > rid="${objectSid##*-}" > echo udm computers/windows modify --dn "$oldn" --set sambaRID="$rid" > udm computers/windows modify --dn "$oldn" --set sambaRID="$rid" > >done < <(sed -e 's/^$/\x00/' < <(printf "$ldif\n\n"))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 36570
:
6344
|
6345
|
6346
|
6542
|
7563
|
7565
|
7566
|
8186