Projet

Général

Profil

Samba4 » Historique » Version 4

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

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