Samba4: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
(112 dazwischenliegende Versionen von 12 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
 
=Installation=
 
=Installation=
−
==Interface anpassen==
+
*[[Samba4 Installation simple]]
−
vi /etc/network/interfaces
+
*[[Samba4 Public Share]]
−
<pre>
+
*[[Samba3 Rocky Simple]]
−
address 192.168.0.100
 
−
netmask 255.255.255.0
 
−
network 192.168.0.0
 
−
broadcast 192.168.0.255
 
−
gateway 192.168.0.1
 
−
dns-nameservers 192.168.0.100 8.8.8.8 (we use our server as DNS + google DNS as secondary DNS)
 
−
dns-search mydomain.lan
 
−
### IPs NOCH ANPASSEN! ###
 
−
</pre>
 
−
 
 
−
==hosts anpassen==
 
−
vi /etc/hosts
 
−
 
−
127.0.0.1      localhost.localdomain  localhost
 
−
192.168.0.100  DC01.mydomain.lan      DC01
 
−
 
 
−
sudo echo DC01.mydomain.lan > /etc/hostname
 
−
/etc/init.d/networking restart
 
−
 
 
−
==Pakete und libs installieren==
 
−
 
 
−
sudo apt-get update && apt-get upgrade -y
 
−
sudo apt-get install git build-essential libacl1-dev libattr1-dev libblkid-dev libgnutls-dev libreadline-dev python-dev python-dnspython gdb pkg-config libpopt-dev libldap2-dev dnsutils libbsd-dev attr krb5-user docbook-xsl libcups2-dev libpam0g-dev ntp -y
 
−
 
 
−
You'll be asked for kerberos informations.
 
−
When asked for the default realm etc, enter mydomain.lan and DC01 as the host.
 
−
 
 
−
==samba4 downloaden und installieren==
 
−
 
 
−
git clone -b v4-0-stable git://git.samba.org/samba.git samba4
 
−
 
 
−
cd samba4
 
−
 
 
−
./configure --enable-debug --enable-selftest
 
−
 
 
−
make
 
−
 
 
−
make install
 
−
 
 
−
==Links setzen==
 
−
 
 
−
ln -s /usr/local/samba/sbin/* /usr/local/sbin
 
−
ln -s /usr/local/samba/bin/* /usr/local/bin
 
−
 
 
−
==Domain anlegen==
 
−
vorher das löschen:
 
−
rm /usr/local/samba/etc/smb.conf
 
−
 
 
−
''' realm, domain und adminpass''' sollten/können angepasst werden!
 
−
/usr/local/samba/bin/samba-tool domain provision --realm=mydomain.lan --domain=mydomain --adminpass="your_password" --server-role=dc --dns-backend=SAMBA_INTERNAL
 
−
 
 
−
==Start von samba==
 
−
/usr/local/samba/sbin/samba
 
−
 
 
−
==smbversion, share und auth check==
 
−
 
 
−
===smbversion===
 
−
Diese sollten übereinstimmen:
 
−
/usr/local/samba/sbin/samba -V
 
−
/usr/local/samba/bin/smbclient -V
 
−
 
 
−
===shares anzeigen:===
 
−
/usr/local/samba/bin/smbclient -L localhost -U%
 
−
 
 
−
Sollte so aussehen:
 
−
<pre>
 
−
Sharename      Type      Comment     
 
−
---------        ----      -------       
 
−
netlogon        Disk
 
−
sysvol            Disk
 
−
IPC$              IPC        IPC Service (Samba 4.0.5)
 
−
</pre>
 
−
 
 
−
===Authentication check:===
 
−
Passwort in dem Command ändern!
 
−
/usr/local/samba/bin/smbclient //localhost/netlogon -UAdministrator%"your_password" -c 'ls'
 
−
<pre>
 
−
Domain=[MYDOMAIN] OS=[Unix] Server=[Samba 4.0.5]
 
−
.                                  D        0  Fri May 17 21:40:08 2013 
 
−
..                                  D        0  Fri May 17 21:42:36 2013
 
−
</pre>
 
−
 
 
−
==DNS setzen==
 
−
===Forwarder eintragen===
 
−
echo  domain MYDOMAIN.LAN >> /etc/resolv.conf
 
−
sudo vi  /usr/local/samba/etc/smb.conf
 
−
 
 
−
füge hinzu: (Man kann natürlich auch seinen eigenen DNS angeben)
 
−
dns forwarder = 8.8.8.8 (I use google DNS here again)
 
−
 
 
−
===Check===
 
−
<pre>
 
−
host -t SRV _ldap._tcp.mydomain.lan
 
−
_ldap._tcp.mydomain.lan has SRV record 0 100 389 DC01.mydomain.lan.
 
−
 
 
−
 
 
−
host -t SRV _kerberos._udp.mydomain.lan
 
−
_kerberos._udp.mydomain.lan has SRV record 0 100 88 DC01.mydomain.lan
 
−
 
 
−
host -t A DC01.mydomain.lan
 
−
DC01.mydomain.lan has address 192.168.0.100.
 
−
</pre>
 
−
 
 
−
Wenn '''"host mydomain.lan not found 3(NXDOMAIN)"''' ausgegeben wird, ist Samba nicht richtig gestartet!
 
−
 
 
−
==Kerberos==
 
−
ändere '''$(REALM)''' zu '''MYDOMAIN.LAN'''
 
−
vi /usr/local/samba/share/setup/krb5.conf
 
−
 
 
−
==Misc==
 
−
===ntp===
 
−
vi /etc/ntp.conf
 
−
 
 
−
füge einen von hier hinzu:
 
−
http://www.pool.ntp.org/zone/de
 
−
 
 
−
service ntp restart
 
−
ntpdate 0.de.pool.ntp.org
 
−
ntpq -p
 
−
 
 
−
===Adminpasswort läuft nicht ab===
 
−
/usr/local/samba/bin/samba-tool user setexpiry administrator --noexpiry
 
−
 
 
−
==Share hinzufügen==
 
−
 
 
−
 
 
−
 
 
−
 
 
−
 
 
−
 
 
−
 
 
−
 
 
−
 
 
−
 
 
−
 
 
−
 
 
−
Code:
 
−
mkdir -m 770 /Users
 
−
chmod g+s /Users
 
−
chown root:users /Users
 
−
then edit /usr/local/samba/etc/smb.conf
 
−
 
 
−
and add the following lines:
 
−
 
 
−
Code:
 
−
[Users]
 
−
directory_mode: parameter = 0700
 
−
read only = no
 
−
path = /Users
 
−
csc policy = documents
 
−
 
 
−
 
 
−
finally set no expiration flag fro your active directory administrator password (or you'll have problems after 42 days)
 
−
 
 
−
Code:
 
−
 
 
−
 
 
−
 
 
−
 
 
−
 
 
−
 
 
−
 
 
−
 
 
−
 
 
−
 
 
−
 
 
  
 +
=Varianten=
 +
*[[Sources]]
 +
*[[Ubuntu-samba4]]
 +
*[[Sernet]]
 +
=Clients=
 +
*[[Debian Samba ADS Member]]
 +
*[[Rocky Samba ADS Member]]
  
 +
=Misc=
 +
*[[samba-tool]]
 +
*[[net]]
 +
*[[ldb-tools]]
 +
*[[RSAT]] (Verwaltungstools)
 +
*[[shares]]
 +
*[[samba rechte]]
 +
*[[2 DCs mit Replikation]]
 +
*[[Roaming Profiles]]
 +
*[[Logonskript]]
 +
*[[Idmap config]]
 +
*[[Heimatverzeichnisse]]
 +
*[[Windows Domain beitreten]]
 +
*[[Ubuntu-ads-client]]
 +
*[[debian-ads-client]]
 +
*[[Samba skipting]]
 +
*[[SSSD]]
 +
*[[Kerberos]]
 +
*[[Gruppenrichtlinien]]
 +
*[[Samba tools misc]]
 +
*[[Debugging]]
 +
*[[Upgrading von 3 nach 4]]
 +
*[[Samba Backup]]
 +
*[[automatic shares]]
 +
*[[change dns backend]]
 +
*[[squid-kerberos]]
 +
*[[squid-keberos-neu]]
 +
*[[samba osx]]
 +
*[[NTP]]
 +
*[[LAM]]
 +
*[[samba mit ldaptools]]
 +
*[[samba ntp]]
 +
*[[Powershell]]
 +
*[[Gemeinsamen Papierkorb einrichten]]
 +
*[[Pop-up-Nachrichten innerhalb der Domain versenden]]
 +
*[[troubelshooting]]
 +
*[[samba-guest-share]]
 +
*[[samba pdf Printer]]
  
 +
=[[pam ldap]]=
 +
*http://zachbethel.com/2013/04/10/linux-ldap-authentication-with-samba4/
 +
=Active Directory Snap-In unter Windows 7=
 +
http://www.nerd.junetz.de/blogbox/index.php?/plugin/faqs/9/61
  
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
-
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
 
−
===samba upstart script===
 
−
 
−
vi /etc/init.d/samba
 
−
 
−
description "SMB/CIFS File and Active Directory Server"
 
−
author      "Jelmer Vernooij <jelmer@ubuntu.com>"
 
−
 
−
start on (local-filesystems and net-device-up)
 
−
stop on runlevel [!2345]
 
−
 
−
expect fork
 
−
normal exit 0
 
−
 
−
pre-start script
 
−
[ -r /etc/default/samba4 ] && . /etc/default/samba4
 
−
install -o root -g root -m 755 -d /var/run/samba
 
−
install -o root -g root -m 755 -d /var/log/samba
 
−
end script
 
−
 
 
−
exec samba -D
 
−
 
−
=howto=
 
−
https://wiki.samba.org/index.php/Samba_AD_DC_HOWTO
 
−
 
−
=installation=
 
−
*http://ubuntuforums.org/showthread.php?t=2146198
 
−
 
−
=dns=
 
−
*zone anlegen
 
−
samba-tool dns add localhost  simplex.local  otto A 192.168.246.23
 
−
=pam ldap=
 
−
*http://zachbethel.com/2013/04/10/linux-ldap-authentication-with-samba4/
 
 
=ldapbackend=
 
=ldapbackend=
 
*http://www.foteviken.de/?p=1925
 
*http://www.foteviken.de/?p=1925
Zeile 274: Zeile 85:
 
=kennwortrichtlinien=
 
=kennwortrichtlinien=
 
http://chris-blog.net/2014/01/kennwortrichtlinie-in-samba-4-domain-deaktivieren/
 
http://chris-blog.net/2014/01/kennwortrichtlinie-in-samba-4-domain-deaktivieren/
 +
 +
=Stefan Kania short=
 +
*https://www.informatik-aktuell.de/betrieb/server/samba-4-als-domaincontroller-einrichten-und-verwalten.html

Aktuelle Version vom 16. Februar 2026, 17:38 Uhr

Installation

Varianten

Clients

Misc

pam ldap

Active Directory Snap-In unter Windows 7

http://www.nerd.junetz.de/blogbox/index.php?/plugin/faqs/9/61

ldapbackend

samba-and-active-directory

domain member

group policiy

movies

Kennwortrichtlinie deaktivieren

Du gehst in die Gruppenrichtlinienverwaltung.
Dann gehst du in das Verzecihnis deiner gewünschten Domäne.
Jetzt solltest du einen eintrag sehen, der sich "Default Domain Controllers Policy" nennt.
Mit rechter Maustaste draufklicken und bearbeiten. Dann öffnet sich der Gruppenrichtlinienverwaltungs-Editor
(Achtung! Auf den ersten Blick sehr leicht mit der Gruppenrichtlinienverwaltung zu verwechseln).
Jetzt schaust du unter "Computerconfiguration> Richtlinien> Windows-Einstellungen> Sicherheitseinstellungen> Kontorichtlinien> Kennwortrichtlinien.

Dort darf man dann endlich die Kennwortrichtlinie deaktivieren.

debian

ubuntu

http://xiep.de/allgemein/ubuntu-server-12-04-mit-samba-4-und-active-directory-pdc/

dns

https://wiki.archlinux.org/index.php/Samba_4_Active_Directory_Domain_Controller

kennwortrichtlinien

http://chris-blog.net/2014/01/kennwortrichtlinie-in-samba-4-domain-deaktivieren/

Stefan Kania short