Projet

Général

Profil

Samba4 » Historique » Version 5

Gilles Grandgérard, 23/10/2014 11:27

1 2 Gilles Grandgérard
h1. Samba4 Secondaire
2 2 Gilles Grandgérard
3 2 Gilles Grandgérard
h2. config eof
4 3 Gilles Grandgérard
<pre><code class="JSON">
5 5 Gilles Grandgérard
{
6 5 Gilles Grandgérard
 "libelle_etab":            {"owner": "gen_config", "val": "ACA"},
7 5 Gilles Grandgérard
 "adresse_ip_eth0":         {"owner": "gen_config", "val": "172.20.56.46"},
8 5 Gilles Grandgérard
 "system_mail_to":          {"owner": "gen_config", "val": "eolebase"},
9 5 Gilles Grandgérard
 "check_passwd":            {"owner": "gen_config", "val": "non"}, 
10 5 Gilles Grandgérard
 "nom_domaine_local":       {"owner": "gen_config", "val": "ac-test.lan"},
11 5 Gilles Grandgérard
 "proxy_client_adresse":    {"owner": "gen_config", "val": "172.20.210.10"},
12 5 Gilles Grandgérard
 "exim_relay_smtp":         {"owner": "gen_config", "val": "smtp.ac-dijon.fr"},
13 5 Gilles Grandgérard
 "netmask_ssh_eth0":        {"owner": "gen_config", "val": ["0.0.0.0"]},
14 5 Gilles Grandgérard
 "ip_admin_eth0":           {"owner": "gen_config", "val": ["0.0.0.0"]},
15 5 Gilles Grandgérard
 "numero_etab":             {"owner": "gen_config", "val": "0000000A"},
16 5 Gilles Grandgérard
 "nom_machine":             {"owner": "gen_config", "val": "eolebase2"},
17 5 Gilles Grandgérard
 "netmask_admin_eth0":      {"owner": "gen_config", "val": ["0.0.0.0"]},
18 4 Gilles Grandgérard
 "domaine_messagerie_etab": {"owner": "gen_config", "val": "ac-test.fr"},
19 5 Gilles Grandgérard
 "ip_ssh_eth0":             {"owner": "gen_config", "val": ["0.0.0.0"]},
20 5 Gilles Grandgérard
 "nom_academie":            {"owner": "gen_config", "val": "ac-test"},
21 5 Gilles Grandgérard
 "adresse_ip_gw":           {"owner": "gen_config", "val": "172.20.56.254"},
22 5 Gilles Grandgérard
 "activer_proxy_client":    {"owner": "gen_config", "val": "oui"},
23 5 Gilles Grandgérard
 "adresse_ip_dns":          {"owner": "gen_config", "val": ["172.20.210.10"]}
24 4 Gilles Grandgérard
}
25 3 Gilles Grandgérard
</code></pre>
26 2 Gilles Grandgérard
h2. instalation
27 1 Gilles Grandgérard
28 1 Gilles Grandgérard
<pre>
29 1 Gilles Grandgérard
#
30 1 Gilles Grandgérard
# INSTALLATION SECONDAIRE !!!!!
31 1 Gilles Grandgérard
# le primaire est 'eolebase' en 172.20.56.45
32 1 Gilles Grandgérard
#
33 1 Gilles Grandgérard
34 1 Gilles Grandgérard
apt-get update
35 1 Gilles Grandgérard
36 1 Gilles Grandgérard
export DEBIAN_FRONTEND=noninteractive
37 1 Gilles Grandgérard
38 1 Gilles Grandgérard
apt-get -q -y install build-essential autotools-dev comerr-dev dpkg-dev ethtool krb5-multidev libacl1-dev libattr1-dev libblkid-dev \
39 1 Gilles Grandgérard
libblkid1 libc-dev-bin libc6-dev libdevmapper1.02.1 libgcrypt11-dev libgnutls-dev libgpg-error-dev libkrb5-dev libncurses5-dev \
40 1 Gilles Grandgérard
libpopt-dev libreadline-gplv2-dev libssl-dev libstdc++6-4.4-dev libtasn1-3-dev libudev0 linux-libc-dev manpages-dev python-dev \
41 1 Gilles Grandgérard
udev uuid-dev zlib1g-dev krb5-user
42 1 Gilles Grandgérard
43 1 Gilles Grandgérard
unset DEBIAN_FRONTEND
44 1 Gilles Grandgérard
45 1 Gilles Grandgérard
cd /root
46 1 Gilles Grandgérard
tar -zxvf samba-4.1.13.tar.gz
47 1 Gilles Grandgérard
cd samba-4.1.13
48 1 Gilles Grandgérard
./configure --with-ldap
49 1 Gilles Grandgérard
make
50 1 Gilles Grandgérard
make install
51 1 Gilles Grandgérard
52 1 Gilles Grandgérard
cp samba4.sh /etc/init.d/samba4
53 1 Gilles Grandgérard
chmod 755 /etc/init.d/samba4
54 1 Gilles Grandgérard
update-rc.d samba4 default
55 1 Gilles Grandgérard
56 1 Gilles Grandgérard
#implicite
57 1 Gilles Grandgérard
#apt-get install ntpdate
58 1 Gilles Grandgérard
#ntpdate pool.ntp.org
59 1 Gilles Grandgérard
#apt-get install ntp
60 1 Gilles Grandgérard
61 1 Gilles Grandgérard
# socket NTP Samba
62 1 Gilles Grandgérard
cd /usr/share/eole/creole/modif/
63 1 Gilles Grandgérard
cp ../distrib/ntp.conf .
64 1 Gilles Grandgérard
cat >>ntp.conf <<EOF
65 1 Gilles Grandgérard
ntpsigndsocket  /usr/local/samba/var/lib/ntp_signd
66 1 Gilles Grandgérard
EOF
67 1 Gilles Grandgérard
sed -i 's/restrict default kod notrap nomodify nopeer noquery/restrict default kod notrap nomodify nopeer noquery mssntp/g' ntp.conf
68 1 Gilles Grandgérard
69 1 Gilles Grandgérard
# Hostname FQDN
70 1 Gilles Grandgérard
cat >hostname <<EOF
71 1 Gilles Grandgérard
%%nom_machine.%%nom_domaine_local
72 1 Gilles Grandgérard
EOF
73 1 Gilles Grandgérard
74 1 Gilles Grandgérard
gen_patch
75 1 Gilles Grandgérard
76 1 Gilles Grandgérard
chgrp ntp /usr/local/samba/var/lib/ntp_signd
77 1 Gilles Grandgérard
usermod -a -G staff ntp
78 1 Gilles Grandgérard
79 1 Gilles Grandgérard
reconfigure
80 1 Gilles Grandgérard
81 1 Gilles Grandgérard
82 1 Gilles Grandgérard
echo "export PATH=$PATH:/usr/local/samba/sbin:/usr/local/samba/bin" >> /root/.bashrc
83 1 Gilles Grandgérard
source /root/.bashrc
84 1 Gilles Grandgérard
85 1 Gilles Grandgérard
#bascule sur primaire
86 1 Gilles Grandgérard
cat >/etc/resolv.conf <<EOF
87 1 Gilles Grandgérard
nameserver 172.20.56.45
88 1 Gilles Grandgérard
search ac-test.lan
89 1 Gilles Grandgérard
EOF
90 1 Gilles Grandgérard
91 1 Gilles Grandgérard
cat >/etc/krb5.conf <<EOF
92 1 Gilles Grandgérard
[libdefaults]
93 1 Gilles Grandgérard
 dns_lookup_realm = true
94 1 Gilles Grandgérard
 dns_lookup_kdc = true
95 1 Gilles Grandgérard
 default_realm = AC-TEST.LAN
96 1 Gilles Grandgérard
EOF
97 1 Gilles Grandgérard
98 1 Gilles Grandgérard
kinit administrator
99 1 Gilles Grandgérard
100 1 Gilles Grandgérard
#debug /usr/local/samba/sbin/samba -i -d9
101 1 Gilles Grandgérard
/usr/local/samba/sbin/samba
102 1 Gilles Grandgérard
103 1 Gilles Grandgérard
samba-tool domain join ac-test.lan DC -U administrator --realm=ac-test.lan -W AC-TEST.LAN
104 1 Gilles Grandgérard
105 1 Gilles Grandgérard
samba-tool dns add 127.0.0.1 ac-test.lan ac-test.lan NS eolebase2.ac-test.lan
106 1 Gilles Grandgérard
107 1 Gilles Grandgérard
#bascule sur moi
108 1 Gilles Grandgérard
cat >/etc/resolv.conf <<EOF
109 1 Gilles Grandgérard
nameserver 127.0.0.1
110 1 Gilles Grandgérard
search ac-test.lan
111 1 Gilles Grandgérard
EOF
112 1 Gilles Grandgérard
113 1 Gilles Grandgérard
114 1 Gilles Grandgérard
</pre>