Catatanw

April 4, 2013

Instalasi Samba4 Sebagai Domain Controller di RedHat Enterprise Linux 6.1 Bagian 1

Filed under: Kegiatan,Linux,Ngoprek — catatanpinguin @ 12:50

Overview

Samba adalah paket aplikasi open source yang menyediakan layanan file dan cetak untuk semua jenis klien SMB/CIFS, termasuk berbagai versi sistem operasi Microsoft Windows. Samba dapat digunakan sebagai Active Directory Domain Controller yang dapat memberikan Active Directory logon dan protokol administrasi yang mendukung Windows XP, Windows 7, dan Mac OS X, dukungan klien untuk definisi group policy sebuah DNS server internal dengan dukungan untuk dynamic update.

Skenario:

IP: 192.168.100.189
hostname: smb4
Domain: ker.en

Instalasi

1. Instal paket dependensi

#yum install libacl-devel e2fsprogs-devel gnutls-devel readline-devel python-devel gdb gcc gcc-c++ cups-devel pam-devel ctdb-devel openldap-devel libsmbclient libacl-devel libblkid-devel gnutls-devel readline-devel python-devel gdb pkgconfig krb5-workstation zlib-devel setroubleshoot-server setroubleshoot-plugins policycoreutils-python popt-devel libpcap-devel sqlite-devel libidn-devel libsemanage-python setools-libs-python setools-libs libxml2-devel libacl-devel libsepol-devel libattr-devel keyutils-libs-devel cyrus-sasl-devel

2. Download source samba4, configure, dan make

#wget https://ftp.samba.org/pub/samba/stable/samba-4.0.3.tar.gz

#tar -xvf samba-4.0.3.tar.gz

#cd samba-4.0.3

#./configure –enable-selftest

#make

#make install

3. Buat init script untuk samba4 di /etc/init.d/samba4

#vim /etc/init.d/samba4

salin dan tempel skrip dibawah ini:

#! /bin/bash
#
# samba4 Bring up/down samba4 service
#
# chkconfig: - 90 10
# description: Activates/Deactivates all samba4 interfaces
# configured to start at boot time.
#
### BEGIN INIT INFO
# Provides:
# Should-Start:
# Short-Description: Bring up/down samba4
# Description: Bring up/down samba4
### END INIT INFO
# Source function library.
. /etc/init.d/functions

if [ -f /etc/sysconfig/samba4 ]; then
. /etc/sysconfig/samba4
fi

CWD=$(pwd)
prog=”samba4″

start() {
# Attach irda device
echo -n $”Starting $prog: ”
/usr/local/samba/sbin/samba
sleep 2
if ps ax | grep -v “grep” | grep -q /samba/sbin/samba ; then success $”samba4 startup”; else failure $”samba4 startup”; fi
echo
}
stop() {
# Stop service.
echo -n $”Shutting down $prog: ”
killall samba
sleep 2
if ps ax | grep -v “grep” | grep -q /samba/sbin/samba ; then failure $”samba4 shutdown”; else success $”samba4 shutdown”; fi
echo
}
status() {
/usr/local/samba/sbin/samba –show-build
}

# See how we were called.
case “$1″ in
start)
start
;;
stop)
stop
;;
status)
status irattach
;;
restart|reload)
stop
start
;;
*)
echo $”Usage: $0 {start|stop|restart|status}”
exit 1
esac

exit 0

#chmod 755 /etc/init.d/samba

4. Konfigurasi /etc/hosts

192.168.100.189    smb4     smb4.ker.en

4. Buat domain provision

#/usr/local/samba/bin/samba-tool domain provision

5. Start samba4

#/etc/init.d/samba4 start

6. testing samba4

# smbclient –version

# smbclient -L localhost -U%

# smbclient //localhost/netlogon -Uadministrator%PASSWORD

1 Comment »

  1. […] Tulisan berikut adalah lanjutan dari tulisan sebelumnya klik disini. […]

    Pingback by Instalasi Samba4 Sebagai Domain Controller di Red Hat Enterprise Server 6.1 Bagian 2 | Catatan Pinguin — April 4, 2013 @ 13:06 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: