Bug 26712 - Kein Schreibzugriff für Mitglieder der Gruppe Printer-Admins auf Samba3 Memberserver
Kein Schreibzugriff für Mitglieder der Gruppe Printer-Admins auf Samba3 Membe...
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: Samba
UCS 3.0
Other Linux
: P5 normal (vote)
: UCS 3.2-x
Assigned To: Samba maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-04 12:33 CEST by Arvid Requate
Modified: 2016-10-11 07:40 CEST (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2012-04-04 12:33:43 CEST
Auf einem UCS 3.0 Memberserver der in eine Samba3-Domäne gejoined ist, ist für Mitglieder der Gruppe "Printer-Admins" kein Schreibzugriff auf die lokale Druckertreiber-Freigabe 'print$' möglich, auf dem Master hingegen schon.

root@s3member:~# id bob
uid=2005(bob) gid=5001(Domain Users) Gruppen=5001(Domain Users),5016(Printer-Admins)
root@s3member:/tmp# smbclient //member/print\$ -Ubob%univention
Domain=[X64ERR300S3] OS=[Unix] Server=[Samba 3.5.11]
smb: \> put testfile
NT_STATUS_ACCESS_DENIED opening remote file \testfile

Auf dem Samba3 Master hat der Benutzer beim Zugriff folgendes NT token:
===============================================================
  SID[  0]: S-1-5-21-1586069869-2032791779-947036627-5010
  SID[  1]: S-1-5-21-1586069869-2032791779-947036627-513
  SID[  2]: S-1-1-0
  SID[  3]: S-1-5-2
  SID[  4]: S-1-5-11
  SID[  5]: S-1-5-32-550
  SID[  6]: S-1-5-21-1586069869-2032791779-947036627-11051
  SID[  7]: S-1-22-1-2005
  SID[  8]: S-1-22-2-5001
  SID[  9]: S-1-22-2-5022
  SID[ 10]: S-1-22-2-5020
  SID[ 11]: S-1-22-2-5016
  SID[ 12]: S-1-22-2-5025
===============================================================
root@master:~# wbinfo -s S-1-5-32-550
BUILTIN+Print Operators 4
root@master:~# wbinfo -s S-1-22-2-5022
Unix Group+Everyone 2
root@master:~# wbinfo -s S-1-22-2-5020
Unix Group+Authenticated Users 2
root@master:~# wbinfo -s S-1-22-2-5016
Unix Group+Printer-Admins 2

D.h. auf dem Master funktioniert der Zugriff.
Nebenbei interessant für Bug 26693, hier allerdings unter Samba3:
  "Unix Group+Printer-Admins" != "BUILTIN+Print Operators"


Auf dem Samba3 Member erhält der Benutzer hingegen folgendes NT token:
===============================================================
  SID[  0]: S-1-5-21-1586069869-2032791779-947036627-5010
  SID[  1]: S-1-5-21-1586069869-2032791779-947036627-513
  SID[  2]: S-1-1-0
  SID[  3]: S-1-5-2
  SID[  4]: S-1-5-11
  SID[  5]: S-1-5-21-1586069869-2032791779-947036627-11051
  SID[  6]: S-1-22-1-2005
  SID[  7]: S-1-22-2-5001
  SID[  8]: S-1-22-2-55000
  SID[  9]: S-1-22-2-55001
  SID[ 10]: S-1-22-2-55002
  SID[ 11]: S-1-22-2-5025
===============================================================
root@member:/tmp# wbinfo -s S-1-22-2-5001
Unix Group+Domain Users 2
root@member:/tmp# wbinfo -s S-1-22-2-55000
Unix Group+55000 2
root@member:/tmp# wbinfo -s S-1-22-2-55001
Unix Group+55001 2
root@member:/tmp# wbinfo -s S-1-22-2-55002
Unix Group+55002 2

Auf dem Meberserver ist die SID der Printer-Admins nicht im NT token des Benutzers. Es ist noch unklar was die drei 5-stelligen RIDs sind, die für winbind anscheinend nicht auflösbar sind.

+++ This bug was initially created as a clone of Bug #26693 +++
Comment 1 Arvid Requate univentionstaff 2012-04-04 14:10:18 CEST
Der drei unbekannten SIDs sind vom s3member per IDMAP im LDAP angelegt worden:

# S-1-5-2, idmap, univention, x64err300s3.qa
dn: sambaSID=S-1-5-2,cn=idmap,cn=univention,dc=x64err300s3,dc=qa
objectClass: sambaIdmapEntry
objectClass: sambaSidEntry
gidNumber: 55001
sambaSID: S-1-5-2
structuralObjectClass: sambaSidEntry
entryUUID: a7050f8e-ba8e-1030-9e04-25d4e99d5a79
creatorsName: cn=s3member,cn=memberserver,cn=computers,dc=x64err300s3,dc=qa
createTimestamp: 20111214110100Z
entryCSN: 20111214110100.736053Z#000000#000#000000
modifiersName: cn=s3member,cn=memberserver,cn=computers,dc=x64err300s3,dc=qa
modifyTimestamp: 20111214110100Z
entryDN: sambaSID=S-1-5-2,cn=idmap,cn=univention,dc=x64err300s3,dc=qa
subschemaSubentry: cn=Subschema
hasSubordinates: FALSE


S-1-5-2  wird hier auf Posix ID  55001 gemapped und dann im NT User token als "Unix Group" unter der SID S-1-22-2-55001 aufgeführt. Analoges gilt für
  S-1-1-0  -> 55000
  S-1-5-11 -> 55002

Das ist zwar eigenartig, aber für das Problem hier vermutlich unerheblich.
Comment 2 Arvid Requate univentionstaff 2012-04-04 15:18:35 CEST
Note: Winbind kann auf dem Memberserver die Gruppe BUILTIN+"Print Operators" nicht aufösen (aufgefallen an Bug 26693 Comment 3):

==================================================
root@s3member:~# wbinfo -n BUILTIN+"Print Operators"
S-1-5-32-550 SID_ALIAS (4)
root@s3member:~# wbinfo -s S-1-5-32-550
BUILTIN+Print Operators 4
root@s3member:~# wbinfo -Y S-1-5-32-550
Could not convert sid S-1-5-32-550 to gid


root@s3master:~# wbinfo -n BUILTIN+"Print Operators"
S-1-5-32-550 SID_ALIAS (4)
root@s3master:~# wbinfo -s S-1-5-32-550
BUILTIN+Print Operators 4
root@s3master:~# wbinfo -Y S-1-5-32-550
5016
==================================================
Comment 3 Arvid Requate univentionstaff 2012-04-04 15:18:57 CEST
Note #2: Obwohl Printer-Admins im UCS-LDAP per base.ldif statisch als Gruppe mit der SID S-1-5-32-550 angelegt wird, alloziert winbind bei Nachfrage ein neues IDMAP-Objekt im UCS-LDAP:

==================================================
root@s3member:~# wbinfo -n "Unix Group+Printer-Admins"
S-1-22-2-5016 SID_DOM_GROUP (2)
root@s3member:~# wbinfo -s S-1-22-2-5016
Unix Group+Printer-Admins 2
root@s3member:~# wbinfo -Y S-1-22-2-5016
55004        ### Dynamisch alloziert per winbind IDMAP
root@s3member:~# ldapdelete -D "$ldap_hostdn" -y /etc/machine.secret \
>  "sambaSID=S-1-22-2-5016,cn=idmap,cn=univention,dc=x64err300s3,dc=qa"
root@s3member:~# net cache flush
root@s3member:~# wbinfo -Y S-1-22-2-5016
55005

root@s3master:~# wbinfo -n "Unix Group+Printer-Admins"
S-1-22-2-5016 SID_DOM_GROUP (2)
root@s3master:~# wbinfo -s S-1-22-2-5016
Unix Group+Printer-Admins 2
root@s3master:~# wbinfo -Y S-1-22-2-5016
55005
root@s3master:~# ldapdelete -D "$ldap_hostdn" -y /etc/machine.secret \
>  "sambaSID=S-1-22-2-5016,cn=idmap,cn=univention,dc=x64err300s3,dc=qa"
root@s3master:~# net cache flush
root@s3master:~# wbinfo -Y S-1-22-2-5016
55006
==================================================
Comment 4 Arvid Requate univentionstaff 2012-04-05 11:24:37 CEST
Das Problem entsteht dadurch, dass "Printer-Admins" im UCS LDAP mit der "well known" SID der Windows/Samba BUILTIN Gruppe "Print Operators" angelegt ist.

Wenn man die SID auf eine normale Domain-SID ändert, dann funktioniert der Zugriff für Mitglieder der Gruppe "Printer-Admins" auch auf dem Samba3 Memberserver.
Comment 5 Stefan Gohmann univentionstaff 2012-11-13 20:40:51 CET
(In reply to comment #4)
> Das Problem entsteht dadurch, dass "Printer-Admins" im UCS LDAP mit der "well
> known" SID der Windows/Samba BUILTIN Gruppe "Print Operators" angelegt ist.
> 
> Wenn man die SID auf eine normale Domain-SID ändert, dann funktioniert der
> Zugriff für Mitglieder der Gruppe "Printer-Admins" auch auf dem Samba3
> Memberserver.

An Bug #26693 ist ein Workaround beschrieben:

setfacl -R -m u:<Benutzer>:rwx /var/lib/samba/drivers/
setfacl -R -d -m u:<Benutzer>:rwx /var/lib/samba/drivers/

Das Problem sollte zusammen mit Bug #26693 gelöst werden.
Comment 6 Stefan Gohmann univentionstaff 2016-10-11 07:40:25 CEST
This issue has been filed against UCS 3.0.

UCS 3.0 is out of maintenance and many UCS components have vastly changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please reopen.