Samba4 mit ZFS unter FreeBSD10.3

peterle

Forenkasper
Hat einer von Euch dazu ein Art "Idiots Guide", der für Unterkartoffeln wie mich geeignet scheint?

Code:
==> samba-tool domain provision
Realm: TEST-REALM
 Domain [TEST-REALM]: TEST-DOMAIN
 Server Role (dc, member, standalone) [dc]: standalone
 DNS backend (SAMBA_INTERNAL, BIND9_FLATFILE, BIND9_DLZ, NONE) [SAMBA_INTERNAL]:
 DNS forwarder IP address (write 'none' to disable forwarding) [192.168.2.1]:
Administrator password:
Retype password:
Looking up IPv4 addresses
Looking up IPv6 addresses
No IPv6 address will be assigned
Setting up share.ldb
Setting up secrets.ldb
Setting up the registry
Setting up the privileges database
Setting up idmap db
Setting up SAM db
Setting up sam.ldb partitions and settings
Setting up sam.ldb rootDSE
Pre-loading the Samba 4 and AD schema
Adding DomainDN: DC=ROADRUNNER
Adding configuration container
Setting up sam.ldb schema
Setting up sam.ldb configuration data
Setting up display specifiers
Modifying display specifiers
Adding users container
Modifying users container
Adding computers container
Modifying computers container
Setting up sam.ldb data
Setting up well known security principals
Setting up sam.ldb users and groups
Setting up self join
Setting up sam.ldb rootDSE marking as synchronized
Fixing provision GUIDs
ERROR(runtime): uncaught exception - pytalloc_reference_ex() called for object type not based on talloc
  File "/usr/local/lib/python2.7/site-packages/samba/netcmd/__init__.py", line 175, in _run
  return self.run(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/samba/netcmd/domain.py", line 434, in run
  nosync=ldap_backend_nosync, ldap_dryrun_mode=ldap_dryrun_mode)
  File "/usr/local/lib/python2.7/site-packages/samba/provision/__init__.py", line 2169, in provision
  skip_sysvolacl=skip_sysvolacl)
  File "/usr/local/lib/python2.7/site-packages/samba/provision/__init__.py", line 1861, in provision_fill
  attrs=['defaultObjectCategory'])
  File "/usr/local/lib/python2.7/site-packages/samba/dbchecker.py", line 134, in check_database
  error_count += self.check_object(object.dn, attrs=attrs)
  File "/usr/local/lib/python2.7/site-packages/samba/dbchecker.py", line 1286, in check_object
  normalised = self.samdb.dsdb_normalise_attributes(self.samdb_schema, attrname, [val])
  File "/usr/local/lib/python2.7/site-packages/samba/samdb.py", line 671, in dsdb_normalise_attributes
  return dsdb._dsdb_normalise_attributes(ldb, ldap_display_name, ldif_elements)

==>

Code:
==> pkg info |grep samba
samba36-libsmbclient-3.6.25_2  Shared lib from the samba package
samba42-4.2.11  Free SMB/CIFS and AD/DC server and client for Unix

Den samba36-libsmbclient braucht er für gnomevfs etc.
Da es keinen Ausschluß bei Installation gibt, gehe ich mal davon aus, daß sie sich nicht stören.

Interessanterweise rennt das Ding auf einem 10.1 ohne irgendwelche Destops einfach durch, aber anmelden lassen will er mich nicht, weil:

Code:
==> smbclient -L 192.168.2.180
Enter user's password:
session setup failed: NT_STATUS_UNSUCCESSFUL

Ich habe jetzt gefühlte tausend Seiten, Tips und Hinweise gelesen, aber nichts davon bringt mich wirklich weiter und ich kann mir nicht vorstellen, daß SAMBA4 mit ZFS und FreeBSD so ein Hexenwerk sein soll?

Irgendwo, muß irgendwas, irgendwie anders sein?
 
Wenn das samba-tool abraucht, ist sicherlich die Konfiguration unvollständig. Versuche doch einfach, das Setup per Hand zu machen.

Rob
 
Wenn das samba-tool abraucht, ist sicherlich die Konfiguration unvollständig. Versuche doch einfach, das Setup per Hand zu machen.

Rob
Mit "samba-tool domain provision" erstellt man die überhaupt erstmal die smb4.conf.. Wie soll die dann unvollständig sein? ;)
@peterle: Du erwähnst explizit ZFS: Vermutest du den Grund hier? Ich habe die Tage ebenfalls "samba-tool domain provision" ausgeführt. Allerdings war es bei mir erfolgreich...
 
@peterle: Du erwähnst explizit ZFS: Vermutest du den Grund hier? Ich habe die Tage ebenfalls "samba-tool domain provision" ausgeführt. Allerdings war es bei mir erfolgreich...

Das freut mich für Dich. :ugly::D
Ich bin mir nicht sicher, mir scheint es etwas mit der access control zu tun zu haben, die läuft letztendlich auf beiden Systemen nicht. Zumindest spukt ein
Code:
==> samba-tool ntacl sysvolcheck
ERROR(<type 'exceptions.AttributeError'>): uncaught exception - 'NoneType' object has no attribute 'endswith'
  File "/usr/local/lib/python2.7/site-packages/samba/netcmd/__init__.py", line 175, in _run
  return self.run(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/samba/netcmd/ntacl.py", line 249, in run
  lp)
  File "/usr/local/lib/python2.7/site-packages/samba/provision/__init__.py", line 1720, in checksysvolacl
  for dir_path in [os.path.join(sysvol, dnsdomain), netlogon]:
  File "/usr/local/lib/python2.7/posixpath.py", line 70, in join
  elif path == '' or path.endswith('/'):

fährt bei beiden vor die Wand.

Aber ich stochere da auch irgendwie nur noch im Nebel rum.
Einige scheinen die zfs acl zu verstellen.
Bei mir steht da:
Code:
==> zfs get all |grep acl
zroot  aclmode  discard  default
zroot  aclinherit  restricted  default
zroot/ROOT  aclmode  discard  default
zroot/ROOT  aclinherit  restricted  default
zroot/ROOT/default  aclmode  discard  default
zroot/ROOT/default  aclinherit  restricted  default
zroot/tmp  aclmode  discard  default
zroot/tmp  aclinherit  restricted  default
zroot/usr  aclmode  discard  default
zroot/usr  aclinherit  restricted  default
zroot/usr/home  aclmode  discard  default
zroot/usr/home  aclinherit  restricted  default
zroot/usr/ports  aclmode  discard  default
zroot/usr/ports  aclinherit  restricted  default
zroot/usr/src  aclmode  discard  default
zroot/usr/src  aclinherit  restricted  default
zroot/var  aclmode  discard  default
zroot/var  aclinherit  restricted  default
zroot/var/audit  aclmode  discard  default
zroot/var/audit  aclinherit  restricted  default
zroot/var/crash  aclmode  discard  default
zroot/var/crash  aclinherit  restricted  default
zroot/var/log  aclmode  discard  default
zroot/var/log  aclinherit  restricted  default
zroot/var/mail  aclmode  discard  default
zroot/var/mail  aclinherit  restricted  default
zroot/var/tmp  aclmode  discard  default
zroot/var/tmp  aclinherit  restricted  default

Was steht denn da bei Dir?
 
Mein Posting vorhin war unvollständig, sorry. Ich setze kein ZFS auf dem Rechner ein, hatte aber ebenfalls Probleme mit den ACLs. Nachdem ich acls in der fstab ergänzt habe (UFS2), funktionierte es.

Versuche mal Folgendes:
# samba-tool domain provision --interactive --use-xattrs=no --use-ntvfs

Schau dir mal README.FreeBSD in /usr/local/share/doc/samba42 an. Dort wird wegen ZFS auch http://glsan.com/community/samba4 empfohlen.
HTH
 
Schau dir mal README.FreeBSD in /usr/local/share/doc/samba42 an. Dort wird wegen ZFS auch http://glsan.com/community/samba4 empfohlen.
HTH

Das zweite hat mich vor allem erst mal bei der einen Maschine weitergebracht, die keine provision mehr brauchte, aber auf ZFS laufen sollte.
Allerdings ist das Zeug da ein wenig alt in dem Link.

Code:
===>> cat /etc/nsswitch.conf
#
# nsswitch.conf(5) - name service switch configuration file
# $FreeBSD: releng/10.1/etc/nsswitch.conf 224765 2011-08-10 20:52:02Z dougb $
#
# group: compat ==> wg Samba4 auf ZFS geändert
group: files winbind
group_compat: nis
hosts: files dns
networks: files
# passwd: compat ==> wg Samba4 auf ZFS geändert
passwd: files winbind
passwd_compat: nis
shells: files
services: compat
services_compat: nis
protocols: files
rpc: files

Code:
===>> more /usr/local/etc/smb4.conf
# Global parameters
[global]
...
# FreeBSD ZFS changes:
  # add the uid to the log
  debug uid = yes
  # add microsecond resolution to timestamp
  debug hires timestamp = yes
  ea support =  yes
#  acl check permissions = yes ==> deprecated in Samba43
  inherit acls = yes
  csc policy = disable
  store dos attributes = yes
  dos filemode = no
  map read only = no
  # added to allow asynchronous I/O (make sure to load the kernel module aio)
  aio read size = 16384
  aio write size = 16384
  # added to enhance the network performance of samba
  socket options = TCP_NODELAY SO_SNDBUF=131072 SO_RCVBUF=131072
...

Ich habe die einzelnen Einträge in der smb4.conf nun nicht alle getestet, geprüft oder verstanden :D, aber das kann ja noch kommen und vielleicht braucht man einige davon ja mit Samba4X>2 nicht mehr.

Voraussetzung war eine Standardinstallation von 10.3 auf ROOT on ZFS und ein pkg install samba4.

Auf jeden Fall war das eine große Hilfe und die richtige Richtung, Danke! :)
 
Zurück
Oben