Projet

Général

Profil

Samba4 » Historique » Version 6

« Précédent - Version 6/14 (diff) - Suivant » - Version actuelle
Gilles Grandgérard, 23/10/2014 11:29


Samba4 Primaire

config eof
{
}

instalation

#
# INSTALLATION SECONDAIRE !!!!!

Samba4 Secondaire

config eof
{
 "libelle_etab":            {"owner": "gen_config", "val": "ACA"},
 "adresse_ip_eth0":         {"owner": "gen_config", "val": "172.20.56.46"},
 "system_mail_to":          {"owner": "gen_config", "val": "eolebase"},
 "check_passwd":            {"owner": "gen_config", "val": "non"}, 
 "nom_domaine_local":       {"owner": "gen_config", "val": "ac-test.lan"},
 "proxy_client_adresse":    {"owner": "gen_config", "val": "172.20.210.10"},
 "exim_relay_smtp":         {"owner": "gen_config", "val": "smtp.ac-dijon.fr"},
 "netmask_ssh_eth0":        {"owner": "gen_config", "val": ["0.0.0.0"]},
 "ip_admin_eth0":           {"owner": "gen_config", "val": ["0.0.0.0"]},
 "numero_etab":             {"owner": "gen_config", "val": "0000000A"},
 "nom_machine":             {"owner": "gen_config", "val": "eolebase2"},
 "netmask_admin_eth0":      {"owner": "gen_config", "val": ["0.0.0.0"]},
 "domaine_messagerie_etab": {"owner": "gen_config", "val": "ac-test.fr"},
 "ip_ssh_eth0":             {"owner": "gen_config", "val": ["0.0.0.0"]},
 "nom_academie":            {"owner": "gen_config", "val": "ac-test"},
 "adresse_ip_gw":           {"owner": "gen_config", "val": "172.20.56.254"},
 "activer_proxy_client":    {"owner": "gen_config", "val": "oui"},
 "adresse_ip_dns":          {"owner": "gen_config", "val": ["172.20.210.10"]}
}

h2. instalation

#
# INSTALLATION SECONDAIRE !!!!!
# le primaire est 'eolebase' en 172.20.56.45
#

apt-get update

export DEBIAN_FRONTEND=noninteractive

apt-get -q -y install build-essential autotools-dev comerr-dev dpkg-dev ethtool krb5-multidev libacl1-dev libattr1-dev libblkid-dev \
libblkid1 libc-dev-bin libc6-dev libdevmapper1.02.1 libgcrypt11-dev libgnutls-dev libgpg-error-dev libkrb5-dev libncurses5-dev \
libpopt-dev libreadline-gplv2-dev libssl-dev libstdc++6-4.4-dev libtasn1-3-dev libudev0 linux-libc-dev manpages-dev python-dev \
udev uuid-dev zlib1g-dev krb5-user

unset DEBIAN_FRONTEND

cd /root
tar -zxvf samba-4.1.13.tar.gz
cd samba-4.1.13
./configure --with-ldap
make
make install

cp samba4.sh /etc/init.d/samba4
chmod 755 /etc/init.d/samba4
update-rc.d samba4 default

#implicite
#apt-get install ntpdate
#ntpdate pool.ntp.org
#apt-get install ntp

# socket NTP Samba
cd /usr/share/eole/creole/modif/
cp ../distrib/ntp.conf .
cat >>ntp.conf <<EOF
ntpsigndsocket  /usr/local/samba/var/lib/ntp_signd
EOF
sed -i 's/restrict default kod notrap nomodify nopeer noquery/restrict default kod notrap nomodify nopeer noquery mssntp/g' ntp.conf

# Hostname FQDN
cat >hostname <<EOF
%%nom_machine.%%nom_domaine_local
EOF

gen_patch

chgrp ntp /usr/local/samba/var/lib/ntp_signd
usermod -a -G staff ntp

reconfigure

echo "export PATH=$PATH:/usr/local/samba/sbin:/usr/local/samba/bin" >> /root/.bashrc
source /root/.bashrc

#bascule sur primaire
cat >/etc/resolv.conf <<EOF
nameserver 172.20.56.45
search ac-test.lan
EOF

cat >/etc/krb5.conf <<EOF
[libdefaults]
 dns_lookup_realm = true
 dns_lookup_kdc = true
 default_realm = AC-TEST.LAN
EOF

kinit administrator

#debug /usr/local/samba/sbin/samba -i -d9
/usr/local/samba/sbin/samba

samba-tool domain join ac-test.lan DC -U administrator --realm=ac-test.lan -W AC-TEST.LAN

samba-tool dns add 127.0.0.1 ac-test.lan ac-test.lan NS eolebase2.ac-test.lan

#bascule sur moi
cat >/etc/resolv.conf <<EOF
nameserver 127.0.0.1
search ac-test.lan
EOF

21_samba.xml.txt Voir (1,25 ko) Joël Cuissinat, 23/10/2014 13:45