Projet

Général

Profil

Samba4 » Historique » Version 6

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

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