SAMBA 4 Active Directory

Transcription

SAMBA 4 Active Directory
SAMBA 4 Active Directory
Version : 58 - 24/11/16
SAMBA 4 : Active Directory
Date Rédaction 24/11/16
Rédacteurs
Nicolas AFCHAIN
Référence
TP_4_Samba4.odt
Mots Clés
SAMBA 4 Active Directory Debian/Wheezy
Sujet
TP Licence Professionnelle R&T
Ce document est publié sous licence Creative Commons « CC BY-NC-SA » :
• CC : Creative Commons Licence Creative Commons Paternité - Pas d'Utilisation
Commerciale - Partage à l'Identique 3.0 non transcrit.
• BY : Paternité. L'auteur conserve la paternité de son œuvre, et vous ne pouvez vous attribuer que
vos propres contributions
TP Licence Professionnelle R&T- Nicolas AFCHAIN
1/21
SAMBA 4 Active Directory
Version : 58 - 24/11/16
Table des matières
1 Pré-requis et préparation du système hôte...................................................................................3
1.1 Installer Virtualbox................................................................................................................4
2 Installation SAMBA 4.................................................................................................................... 5
2.1 Téléchargement via Git......................................................................................................... 6
2.2 Compilation de SAMBA 4......................................................................................................6
2.3 Provision et installation de SAMBA ......................................................................................7
Rendre la configuration permanente.....................................................................................7
2.4 Test du DNS.......................................................................................................................... 9
2.5 Services Samba ................................................................................................................. 10
2.6 Vérification de Kerberos .....................................................................................................11
2.7 Création d'un partage .........................................................................................................11
2.8 Serveur de temps NTP.......................................................................................................12
2.9 ACL Support........................................................................................................................ 12
3 Configuration d'un client Windows XP pour joindre le Domaine Samba 4 Active Directory.........13
3.1 Configuration du DNS du client Windows..........................................................................13
3.2 Configure Date & Time and Time Zone...............................................................................14
Configure the Date & Time................................................................................................15
Configure the Time Zone..................................................................................................15
3.3 Joining Windows Clients to the Domain..............................................................................15
Windows XP Pro............................................................................................................... 17
Pack des outils d'administration Windows :......................................................................17
3.4 Adding Users into Samba 4 Active Directory.......................................................................17
3.5 Test à effectuer depuis Windows........................................................................................19
4 Commandes Utiles :................................................................................................................... 19
TP Licence Professionnelle R&T- Nicolas AFCHAIN
2/21
SAMBA 4 Active Directory
Version : 58 - 24/11/16
Objectifs
Installer et configurer un serveur SAMBA 4 sous Debian Wheezy.
Environnement
Vous disposerez du système d'exploitation GNU/Linux( Debian et Ubuntu) .
En cas de problème avec une commande consulter le manuel disponible en tapant dans un
terminal man suivi du nom de la commande.
Veuillez écrire un rapport comprenant les réponses aux questions, ainsi que les manipulations que
vous faites (taper une ligne de commande par exemple)
1 Pré-requis et préparation du système hôte
TP Licence Professionnelle R&T- Nicolas AFCHAIN
3/21
SAMBA 4 Active Directory
Version : 58 - 24/11/16
1.1 Installer Virtualbox
On ajoute les sources nécessaire a l'installation de la nouvelle version de virtualbox 4.3...
Pour connaître votre distribution/version :
ritek@C3PO:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:
Ubuntu 14.04.1 LTS
Release:
14.04
Codename:
trusty
ou
ritek@C3PO:~$ cat /etc/issue
Ubuntu 14.04.1 LTS \n \l
Vous allez éditer le fichier source /etc/apt/sources.list en fonction de votre distribution :
deb http://download.virtualbox.org/virtualbox/debian trusty contrib
sudo vim /etc/apt/sources.list
Sous vim :wq pour sauvegarder les modifications
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key
add sudo apt-get update
sudo apt-get install virtualbox-4.3
Nous allons utiliser l'iso debian Jessie 64 bits suivante :
cd Téléchargements/
wget -c http://cdimage.debian.org/debian-cd/8.6.0/amd64/iso-cd/debian-8.6.0amd64-netinst.iso
La machine virtuelle aura les paramètres suivants :
TP Licence Professionnelle R&T- Nicolas AFCHAIN
4/21
SAMBA 4 Active Directory
Version : 58 - 24/11/16
2 Installation SAMBA 4
Nous avons plusieurs solutions pour installer Samba 4 :
Compiler SAMBA 4 .
Si l'enseignant vous le demande,vous utiliserez les appliances cf ci dessous :
La compilation de SAMBA 4 nécessite beaucoup de temps sur vos machines TP .Pour éviter ce
long processus vous utiliserez les « appliances » crées sous virtualbox .: SAMBA4
Pour importer l'appliance : File>Import Appliance...>Open Appliance ...
Activer PAE pour la machine SAMBA4
TP Licence Professionnelle R&T- Nicolas AFCHAIN
5/21
SAMBA 4 Active Directory
Version : 58 - 24/11/16
Ce n'est pas nécessaire pour l'appliance WINXP
Vous pouvez passer les points 2.1 et 2.2 .
Répondez aux questions
2.1 Installation via tarball
Nous téléchargeons les sources sous forme d'un tarball grâce au lien suivant :
cd /root
wget –no-check-certificate https://download.samba.org/pub/samba/stable/samba4.3.2.tar.gz
tar -zxvf samba-4….
2.2 Compilation de SAMBA 4
Avant de compiler on vérifie les prérequis :
export DEBIAN_FRONTEND=noninteractive
Modifier le fichier /etc/hostname pour qu'il contienne le nom FQDN (nom + suffixe DNS du réseau
TP Licence Professionnelle R&T- Nicolas AFCHAIN
6/21
SAMBA 4 Active Directory
Version : 58 - 24/11/16
local) de la machine
c3po.cloudme.fr
Modifier le fichier /etc/hosts pour qu'il contienne la résolution DNS du FQDN de la machine sur son
ip ( pas 127.0.0.1), avec le nom long puis le nom court
127.0.0.1
192.168.1.11
localhost
c3po.cloudme.fr
c3po
Rebooter la machine pour prendre en compte ce nouveau nom de machine (un hostname -F
/etc/hostname n'a pas l'air de suffire pour le script samba qui récupère toujours l'ancien nom...)
reboot
Mon fstab par défaut :
root@c3po:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>
<type> <options>
<dump> <pass>
# / was on /dev/sda1 during installation
UUID=c8778e3f-07e5-4242-a6e9-bc7871a0ab3d /
ext4
errors=remount-ro 0
1
# swap was on /dev/sda5 during installation
UUID=04a6de4a-9f87-4c60-a96c-a024c1b88ab7 none
swap
sw
0
0
/dev/sr0
/media/cdrom0
udf,iso9660 user,noauto
0
0
Rajouter les acl et les attribut étendus dans le fichier /etc/fstab
UUID=f1ee9c7a-1405-4850-b15c-070e644f6b67 /
errors=remount-ro,user_xattr,acl,barrier=1 0
ext4
1
Forcer le système à prendre en compte le user_xattr et les acls
mount -o remount,user_xattr,acl /
On installe les dépendances nécessaire à la compilation :
apt-get install acl attr autoconf bison build-essential \
debhelper dnsutils docbook-xml docbook-xsl flex gdb krb5-user \
libacl1-dev libaio-dev libattr1-dev libblkid-dev libbsd-dev \
libcap-dev libcups2-dev libgnutls28-dev libjson-perl \
libldap2-dev libncurses5-dev libpam0g-dev libparse-yapp-perl \
libpopt-dev libreadline-dev perl perl-modules pkg-config \
python-all-dev python-dev python-dnspython python-crypto \
TP Licence Professionnelle R&T- Nicolas AFCHAIN
7/21
SAMBA 4 Active Directory
Version : 58 - 24/11/16
xsltproc zlib1g-dev
apt-get install build-essential libacl1-dev libattr1-dev \
libblkid-dev libgnutls28-dev libreadline-dev python-dev libpam0g-dev \
python-dnspython gdb pkg-config libpopt-dev libldap2-dev \
dnsutils libbsd-dev attr krb5-user docbook-xsl libcups2-dev acl
unset DEBIAN_FRONTEND
cd samba...
./configure
…
'configure' finished successfully (12m26.572s)
make
'build' finished successfully (48m8.231s)
Vous expliquerez ce qu'est SAMBA 4 ,les notions d'active directory pendant le temps de la
compilation.
Cette commande va installer Samba4 dans /usr/local/samba.
make install
'install' finished successfully (22m7.936s)
2.3 Installation via paquets DEB
utiliser la version actuellement "stable" :
echo "deb http://samba.tranquil.it/jessie64/stable/
./" > \
/etc/apt/sources.list.d/tissamba.list
apt-get update
apt-get install samba winbind libnss-winbind krb5-user
2.4 Provision et installation de SAMBA
Avant de lancer « provision » de SAMBA 4 ,veuillez vérifier les paramètres suivants
vim /etc/network/interfaces
Il faut mettre la machine en ip fixe, sinon le fichier /etc/resolv.conf sera écrasé par le client
dhcp lors de la mise à jour du bail.
TP Licence Professionnelle R&T- Nicolas AFCHAIN
8/21
SAMBA 4 Active Directory
Version : 58 - 24/11/16
Rendre la configuration permanente
Avec la distribution Debian GNU/Linux les paramètres de configuration des interfaces réseau
sont stockés dans le répertoire /etc/network. Le fichier interfaces de ce répertoire rassemble la
configuration des interfaces réseau.
Voici l'exemple d'une interface ethernet configurée à l'aide du protocole DHCP :
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# The first network card - this entry was created during the Debian nstallation
# (network, broadcast and gateway are optional)
auto eth0
iface eth0 inet dhcp
Pour une configuration statique de l'interface Voici un exemple :
...
auto eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
Vous utiliserez une adresse IP de la plage : 172.18.45.211 à 172.18.45.220
Pensez à vérifier également :
FQDN (nom + suffixe DNS du réseau local) de la machine
Nom de la machine : c3po
mot de pass root : licence
utilisateur licence
mot de pass licence
nom de domain : cloudme.fr
proxy : cache-etu.univ-lille1.fr:3128
le proxy n'est pas configurer par défaut .
export http_proxy=http://cache-etu.univ-lille1.fr:3128
sudo echo 'Acquire::http::Proxy "http://proxy.mynetwork.com:1234/";' >
/etc/apt/apt.conf.d/proxy
Si Pb Vérifier :
/etc/apt/apt.conf.d/proxy
Acquire::http::proxy "http://adresse:port/";
TP Licence Professionnelle R&T- Nicolas AFCHAIN
9/21
SAMBA 4 Active Directory
Version : 58 - 24/11/16
Termes en Anglais :
DNS domain name : cloudme.fr, NT4 domain name :cloudme, hostname : debian, IP Address :
1xx.xxx.xxx.xxx
terme
definition
AD
Active Directory
DC
Domain Controller
cloudme.fr
AD domain
debian.cloudme.fr
DC FQDN
172.16....
DC IP
CLOUDME.FR
Kerberos Realm
Pour connaître la version de samba4 compilée :
root@debian:~/samba-master# /usr/local/samba/bin/smbclient --versionVersion
4.1.0pre1-GIT-bc6bcee
/usr/local/samba/bin/samba-tool domain provision --use-rfc2307 --interactive
root@Samba4:~# /usr/local/samba/bin/samba-tool domain provision --use-rfc2307
--interactive
Realm [CLOUDME.FR]:
Domain [CLOUDME]:
Server Role (dc, member, standalone) [dc]:
DNS backend (SAMBA_INTERNAL, BIND9_FLATFILE, BIND9_DLZ, NONE)
[SAMBA_INTERNAL]:
DNS forwarder IP address (write 'none' to disable forwarding) [172.18.45.2]:
Administrator password:
Retype password:
ancienne commande :
/usr/local/samba/bin/samba-tool domain provision \
--realm=cloudme.fr --domain=CLOUDME \
--adminpass='p4$$word' --server-role=dc
Adding DNS accounts
Creating CN=MicrosoftDNS,CN=System,DC=cloudme,DC=fr
Creating DomainDnsZones and ForestDnsZones partitions
Populating DomainDnsZones and ForestDnsZones partitions
Setting up sam.ldb rootDSE marking as synchronized
TP Licence Professionnelle R&T- Nicolas AFCHAIN
10/21
SAMBA 4 Active Directory
Version : 58 - 24/11/16
Fixing provision GUIDs
A Kerberos configuration suitable for Samba 4 has been generated at
/usr/local/samba/private/krb5.conf
Setting up fake yp server settings
Once the above files are installed, your Samba4 server will be ready to use
Server Role:
active directory domain controller
Hostname:
Samba4
NetBIOS Domain:
CLOUDME
DNS Domain:
cloudme.fr
DOMAIN SID:
S-1-5-21-2658305894-3758256047-2776569978
Puis démarrer samba
/usr/local/samba/sbin/samba
Qu'est-ce que l'Active Directory ?
Définir les termes suivants :
Domaine,TLD,Contrôleur de domaine ,OU,GPO,FQDN,realm,DNS domain name ,Kerberos
En cas de problème avec l'installation :
Effacer le fichier smb.conf s’il a déjà été généré (il va être régénéré par la commande de
provisionning samba-tool juste après)
rm -f /usr/local/samba/etc/smb.conf
2.5 Test du DNS
Configurer le DNS pour pointer sur lui même dans le fichier /etc/resolv.conf en renseignant
127.0.0.1.
search mondomaine.local
nameserver 127.0.0.1
Vérifier que les forwarders DNS ont bien été configurés dans le fichier
/usr/local/samba/etc/smb.conf
[global]
workgroup = MONDOMAINE
realm = MONDOMAINE.LOCAL
netbios name = SRVADS
server role = active directory domain controller
dns forwarder = 8.8.8.8
Pour tester le bon fonctionnement du DNS
root@frodo:~# host -t SRV _ldap._tcp.cloudme.fr.
TP Licence Professionnelle R&T- Nicolas AFCHAIN
11/21
SAMBA 4 Active Directory
Version : 58 - 24/11/16
_ldap._tcp.cloudme.fr has SRV record 0 100 389 debian.cloudme.fr.
root@frodo:~# host -t SRV _kerberos._udp.cloudme.fr.
_kerberos._udp.cloudme.fr has SRV record 0 100 88 debian.cloudme.fr.
root@frodo:~# host -t A debian.cloudme.fr.
debian.cloudme.fr has address 192.168.0.147
/usr/local/samba/sbin/samba_dnsupdate --verbose
En cas d'échec sur la résolution des noms, il faut contrôler la validité des
informations dans le fichier suivant :
• /etc/resolv.conf
search <domaine-fai>.fr
nameserver <addr dns-fai>
Nom du domaine auquel l'interface de l'hôte est connectée.
Adresse IP du serveur de noms qui doit résoudre toutes les requêtes au
service DNS.
Pour cela éditer le fichier /etc/resolv.conf :
vim /etc/resolv.conf
Modifier les valeurs des lignes « domain », « search » et « name server ». Le contenu du
fichier/etc/resolv.conf est le suivant après modification :
domain cloudme.fr
search cloudme.fr
nameserver Ip de votre serveur
2.6 Services Samba
Pour démarrer le serveur SAMBA, taper la commande suivante :
/usr/local/samba/sbin/samba
Pour vérifier que les services SAMBA sont démarrés, taper la commande suivante :
nmap addressIPServeur
Éviter de taper « nmap localhost » car on ne voit pas le service DNS en écoute. On obtient le
résultat suivant :
53/tcp open domain
80/tcp open http
88/tcp open kerberos-sec
TP Licence Professionnelle R&T- Nicolas AFCHAIN
12/21
SAMBA 4 Active Directory
Version : 58 - 24/11/16
111/tcp open rpcbind
135/tcp open msrpc
139/tcp open netbios-ssn
389/tcp open ldap
445/tcp open microsoft-ds
464/tcp open kpasswd5
636/tcp open ldapssl
1024/tcp open kdm
3268/tcp open globalcatLDAP
3269/tcp open globalcatLDAPssl
Les services ci-dessus doivent obligatoirement être démarrés.
Pour information pour arrêter les services SAMBA 4, taper la commande suivante :
Killall samba
2.7 Vérification de Kerberos
Configuration du fichier de config : ( /etc/krb5.conf)
[libdefaults]
default_realm = ${REALM} à remplacer par CLOUDME.FR
dns_lookup_realm = false
dns_lookup_kdc = true
Nous allons vérifier le bon fonctionnement de Kerberos
Un test simple consiste à utiliser la commande kinit comme suit:
root@frodo:~# kinit [email protected]
Password for [email protected]:
Warning: Your password will expire in 41 days on Wed Jan
9 15:46:44 2013
Note: Vous devez mettre votre realm CLOUDME.FR en majuscule
Pour vérifier que Kerberos nous allons lister les tickets:
klist
root@frodo:~# klist -e
Ticket cache: FILE:/tmp/krb5cc_0
Default principal: [email protected]
Valid starting
Expires
Service principal
28/11/2012 17:41:45 29/11/2012 03:41:45 krbtgt/[email protected]
renew until 29/11/2012 17:41:35, Etype (skey, tkt): arcfour-hmac, arcfourhmac
TP Licence Professionnelle R&T- Nicolas AFCHAIN
13/21
SAMBA 4 Active Directory
Version : 58 - 24/11/16
Pour verifier les partages sysvol et netlogon on utilise :
smbclient -L localhost -U%
Tester l'authentification,on se connecte au partage netlogon:
smbclient //localhost/netlogon -UAdministrator -c 'ls'
2.8 Création d'un partage
L'utilisation de provision à crée un fichier /usr/local/samba/etc/smb.conf sans partage par défaut.
Pour tester notre serveur nous allons créer un partage samba ZION :
# Global parameters
[global]
workgroup = CLOUDME
realm = cloudme.fr
netbios name = VOTREHOSTNAME
server role = active directory domain controller
dns forwarder = VOTREIP
[netlogon]
path = /usr/local/samba/var/locks/sysvol/cloudme.fr/scripts
read only = No
[sysvol]
path = /usr/local/samba/var/locks/sysvol
read only = No
[zion]
path = /data/zion
comment = Partage Licence
read only = no
2.9 Serveur de temps NTP
apt-get install ntp
Paramétrage de ntp (1:4.2.6.p5+dfsg-2) ...
[ ok ] Starting NTP server: ntpd.
root@debian:~/samba-master# ntpq -p
remote
refid
st t when poll reach
delay
offset jitter
==============================================================================
TP Licence Professionnelle R&T- Nicolas AFCHAIN
14/21
SAMBA 4 Active Directory
+obelix.gegeweb.
*ks3267100.kimsu
main.crifo.org
+ntp1.ResComp.Be
2.10
212.37.192.31
192.93.2.20
129.69.1.153
128.32.206.55
Version : 58 - 24/11/16
3
2
2
2
u
u
u
u
10
9
54
41
64
64
64
64
1
1
0
1
37.229
38.039
0.000
190.563
-7.901
-8.530
0.000
-1.932
6.569
7.154
0.002
0.731
ACL Support
apt-get install attr
Nous allons tester le support des ACL
Expliquer ce que sont les ACL ?
touch test.txt
setfattr -n user.test -v test test.txt
setfattr -n security.test -v test2 test.txt
getfattr -d test.txt
getfattr -n security.test -d test.txt
3 Configuration d'un client Windows XP pour joindre le Domaine
Samba 4 Active Directory
Pour permettre à Samba 4 Active Directory ou Microsoft Active Directory de gérer un ordinateur,
celui-ci doit joindre le domaine .Ce qui implique de :
•
Configurer les paramètres de DNS
•
Configurer Date & Time and Time Zone
•
Joindre le domaine
3.1 Configuration du DNS du client Windows
Je sais c'est en Anglais (pas les screen) en même temps cela vous fait travailler l'anglais
indispensable en informatique !!
Before we configure the DNS settings, verify that you are able to ping the server's IP address. If
you are not able to ping the server, double check your IP address, firewall, routing, etc.
Once you have verified network connectivity between the Samba server and client,
•
Clic Droit sur favoris réseau, Propriétés
•
Clic Droit sur connexion au réseau local, Propriétés
•
Double clic sur TCP/IP
•
Utiliser l'adresse de serveur DNS suivante :
TP Licence Professionnelle R&T- Nicolas AFCHAIN
15/21
SAMBA 4 Active Directory
Version : 58 - 24/11/16
Open a command prompt, type 'ping cloudme.fr' .
If you get replies, then it means that your Windows settings are correct for DNS, and the Samba4
server's DNS service is working as well.
3.2 Configure Date & Time and Time Zone
Active Directory uses Kerberos as the backend for authentication. Kerberos requires that the
TP Licence Professionnelle R&T- Nicolas AFCHAIN
16/21
SAMBA 4 Active Directory
Version : 58 - 24/11/16
system clocks on the client and server be synchronized to within a few seconds of each other. If
they are not synchronized, then authentication will fail for apparently no reason.
Configure the Date & Time
Right-Click on the Time display in the system notification area, Select Adjust Date/Time.
Change the Date and Time so the client matches the server to the minute, and click OK
root@debian:~/samba-master# date
mercredi 28 novembre 2012, 22:46:34 (UTC+0100)
Configure the Time Zone
Right-Click on the Time display in the system notification area, Select Adjust Date/Time.
Click on the Time Zone Tab
Change the Time Zone to match the Time Zone on the server.
3.3 Joindre un client Windows au Domaine
Now your Windows computer is ready to join the Active Directory (AD) domain,
As an Administrator:
Clic Droit sur Poste de travail -> Propriétés
Nom de l'ordinateur > Modifier
TP Licence Professionnelle R&T- Nicolas AFCHAIN
17/21
SAMBA 4 Active Directory
Version : 58 - 24/11/16
When it requests a username and password, type Administrator as the username, and p4$$word
as the password.
You should get a message box stating « Welcome to the CLOUDME.FR. »
After restarting, you should be presented with the normal logon dialog.
Change the domain to CLOUDME and type Administrator as the username, and p4$$word as the
password.
Windows XP Pro
Pack des outils d'administration Windows :
•
http://www.microsoft.com/fr-fr/download/details.aspx?id=6315
TP Licence Professionnelle R&T- Nicolas AFCHAIN
18/21
SAMBA 4 Active Directory
Version : 58 - 24/11/16
Démarrer > programmes> Outils d'administration
3.4 Adding Users into Samba 4 Active Directory
To create a Samba user, use the following command:
/usr/local/samba/bin/samba-tool user add USERNAME
To inspect the allocated user ID and SID, use the following command:
/usr/local/samba/bin/wbinfo --name-to-sid USERNAME
S-1-5-21-4036476082-4153129556-3089177936-1005 SID_USER (1)
$ /usr/local/samba/bin/wbinfo --sid-to-uid S-1-5-21-4036476082-41531295563089177936-1005
3000011
If you want to change this mapping, then use ldbedit on the /usr/local/samba/private/idmap.ldb, as
shown:
ldbedit -e vim -H /usr/local/samba/private/idmap.ldb objectsid=S-1-5-214036476082-4153129556-3089177936-1005
You will find records that look like this:
# record 1
dn: CN=S-1-5-21-4036476082-4153129556-3089177936-1005
cn: S-1-5-21-4036476082-4153129556-3089177936-1005
objectClass: sidMap
objectSid: S-1-5-21-4036476082-4153129556-3089177936-1005
type: ID_TYPE_BOTH
xidNumber: 3000011
TP Licence Professionnelle R&T- Nicolas AFCHAIN
19/21
SAMBA 4 Active Directory
Version : 58 - 24/11/16
distinguishedName: CN=S-1-5-21-4036476082-4153129556-3089177936-1005
If you change the xidNumber attribute and save your editor then exit, then Samba will update the
mapping to between the SID and the user ID. Updating group mappings works in the same way.
Note: You can also manage users using the normal Windows AD user management tools.
Setting Up Roaming Profiles
1. You will need to create a share for the profiles, typically named profiles. Edit the
/usr/local/samba/etc/smb.conf to include:
2.
[profiles]
path = /usr/local/samba/var/profiles
read only = no
2. Create the directory above using:
mkdir /usr/local/samba/var/profiles
3. In Windows, start Active Directory Users and Computers, select all the users, right click,
and hit properties
4. Dans the profile tab, in the Profile path, type the path to your share along with
%USERNAME% as follows:
\\debian.cloudme.fr\profiles\%USERNAME%
5. clic OK, logout and login as one of those users. When you logout again, you should see
that the profile has been synced onto the samba server.
3.5 Test à effectuer depuis Windows
ipconfig /release
ipconfig /renew
ipconfig /all
net view /domain:$DOMAIN
net view \\$ADHOST
nbtstat -A $ADHOST_IP4
TP Licence Professionnelle R&T- Nicolas AFCHAIN
20/21
SAMBA 4 Active Directory
Version : 58 - 24/11/16
4 Commandes Utiles :
/etc/init.d/networking restart
realm : nom dns du domaine.
domain : nom netbios du domaine. ( majuscules obligatoires )
Servername: SAMBA
DNS Domain name: mydomain.local
NETBIOS Domain name: MYDOMAIN
Informations de sécurité
Si vous souhaitez supprimer les restrictions des mots de passe nécessitant au moins une majuscule,
une minuscule et un chiffre, tapez la commande suivante :
1samba-tool domain passwordsettings set --complexity=of
Si vous souhaitez supprimer la restriction sur la longueur minimum d’un mot de passe, tapez la
commande suivante :
1samba-tool domain passwordsettings set --min-pwd-length=1
Check des logs :
samba-tool testparm -v
netstat -tulpn | grep ":53"
ps axf | egrep "samba|smbd|nmbd|winbindd"
samba_dnsupdate --verbose
nslookup
TP Licence Professionnelle R&T- Nicolas AFCHAIN
21/21