Membangun File Server & PDC di Ubuntu Server

Membangun rumah file server dan PDC “Primary Domain Conrtolrer” adalah membangun management data di sebuah jaringan lokal area.kalau admin windows mungkin familiar  dengan sebutan Windows Active Directroy ( sama aja deh kayanya )  pengertian file server itu sendiri menurut saya pribadi adalah kumpulan data seluruh klien yang berada di jaringan lalu di simpan dalam satu tempat dalam hal ini sebuah server.

Keuntungan membangun file server & PDC

  • Menyimpan data seluruh klien ( contoh: kantor,seluruh staff masing2 depatement )
  • Sharing data antar departement jadi lebih simple dan rapih
  • Sebagai backup data klien ( di klient ada data kerja di server juga ada,sewaktu2 kalo rusak PC Klient tinggal ambil data dari server )
  • Lebih aman ( apa lagi kalo server nya kan pake linux :p )
  • Memblok monopoli space HD server dari klien

Setelah diuraikan definisi dan keuntungan membangun file server ini lah saat nya langkah membangun file server

OS : Ubuntu Server 8.04 ( Hardy Haron )

Note : Bisa juga di implemantasikan di ubuntu server edisi di atas nya

Share The Spirit Ubuntu

Installasi software dan aplikasi menggunakan Repository dari CDROM dan Repository internet,Berikut cara menggunakan repository dari CDROM dan Intenet

  • Repository dari CDROM,Mounting CDROM dengan perintah

root@library:/# cat /etc/fstab –Lihat lokasi CDROM

root@library:/# mount /dev/scd0 /media/cdrom0

Edit file /etc/apt/source.list kasih comment untuk repository yang lain

root@library:/# nano /etc/apt/source.list

root@library:/# apt-get update

  • Repository dari Internet

Edit file repository yang berada di

root@library:/# /etc/apt/source.list

Lalu rubah dengan repository dari KAMBING di bawah ini

#kambing.ui.edu (UI, Telkom, Indosat, OpenIXP, INHERENT)
deb http://kambing.ui.edu/ubuntu hardy main restricted universe multiverse
deb http://kambing.ui.edu/ubuntu hardy-updates main restricted universe multiverse
deb http://kambing.ui.edu/ubuntu hardy-security main restricted universe multiverse
deb http://kambing.ui.edu/ubuntu hardy-backports main restricted universe multiverse
deb http://kambing.ui.edu/ubuntu hardy-proposed main restricted universe multiverse

Lanjutkan dengan perintah

root@library:/# apt-get update

Kebutuhan Server

  • File Server

Software yang di butuhkan untuk membangun file server adalah SAMBA,berikut apa saja yang harus di install

  • root@library:/# apt-get install samba samba-common
  • root@library:/# apt-get install samba-doc libcupsys2-gnutls10
  • root@library:/# apt-get install libkrb53,winbind,smbclient
  • root@library:/# apt-get install nmap

Mengecek Hasil installasi paket samba

  • root@library:/# dpkg –l ‘*samba*’

Konfigurasi file samba

Demi keamananan backup konfigurasi samba lama di /etc/samba/smb.conf

Lakukan backup dengan cara rename file samba dan buat file samba baru lagi

Berikut cara nya : mv /ets/samba/smb.conf /etc/samba/smb.conf.lama

[global]

workgroup = library

netbios name = pusat data

server string = File Server

passdb backend = tdbsam

security = user

username map = /etc/samba/smbusers

name resolve order = wins bcast host

domain logons = yes

logon path = \%L\profiles%u

preferred master = yes

wins support = yes

## Useradd script

## useradd name -m -G users

## chown -R root:users /home/samba

add user script = /usr/sbin/useradd -m %u

delete user script = /usr/sbin/userdel -r %u

add group script = /usr/sbin/groupadd %g

delete group script = /usr/sbin/groupdel %g

add user to group script = /usr/sbin/usermod -G %g %u

add machine script = /usr/sbin/useradd -s /bin/false/ -d /var/lib/nobody %u

idmap uid = 15000-20000

idmap uid = 15000-20000

## sync smb password with linux password

passwd program = /usr/bin/passwd %u

passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n

passwd chat debug = yes

unix password sync = yes

#set the loglavel

log level = 3

[homes]

comment = Home

valid user = %S

read only = no

browsable = no

[public]

comment = all staff

path = /home/samba/public

valid users = %U

#all user can be access

force group = users

create mode = 0777

directory mode = 0777

writable = yes

browsable = yes

#veto files = /*.mp3/*.avi/*.mpg

[BSA]

comment = CEO

path = /home/samba/BSA

write list = bsa,mgr01,mgr02,marketing02,marketing02,dedi,gd01

valid users = bsa,mgr01,mgr02,marketing02,marketing02,dedi,gd01

force directory mode = 777

directory mode = 777

force group = users

force create mode = 777

browsable = yes

create mode = 0600

directory mode = 0771

[Secretary]

comment = Secretary

path = /home/samba/Secretary

valid users = secretary,dedi,bsa,mgr01

write list = secretary,dedi,bsa,mgr01

create mode = 0660

directory mode = 0771

[F&A]

comment = Finance & Accounting

path = /home/samba/F_A

valid users = finance01,finance02,finance04,finance05,finance06,dedi,mgr01,bsa

force group = users

create mode = 0771

directory mode = 0771

browsable = yes

write list = finance01,finance02,finance04,finance05,finance06,dedi,mgr01,bsa

veto files = /*.mp3/*.avi/*.mpg/*.wav/

[HRD]

writeable = yes

write list = dedi,hrd,sm,mgr01,bsa

path = /home/samba/HRD

comment = Human Resource Division

valid users = dedi,hrd,finance01,mgr01,bsa

create mode = 0771

browsable = yes

veto files = /*.mp3/*.avi/*.mpg

directory mode = 0771

[Operational]

path = /home/samba/Operational

comment = Operational

write list = dedi,mgr01,mgr02,mgr03,stokcist,bsa,gd01

valid users = dedi,mgr01,mgr02,mgr03,stockist,bsa,gd01

create mode = 0771

directory mode = 0771

[Marketing]

valid user = dedi,marketing01,marketing02,marketing03,mgr01,mgr02,bsa,gd01

write list = dedi,marketing01,marketing02,marketing03,mgr01,mgr02,bsa,gd01

path = /home/samba/Marketing

force directory mode = 777

force create mode = 777

comment = Marketing

create mode = 777

directory mode = 777

[GD]

path = /home/samba/GD

comment = Grafic Design

write list = dedi,gd01,bsa,mgr01,mgr02,mrkt01,mrkt03

valid user = dedi,gd01,bsa,mgr01,mgr02,mrkt01,mrkt03

create mode = 777

directory mode = 777

veto files = /*.mp3/*.avi/*.mpg/

[SPO]

path = /home/samba/SPO

comment = Sales Procesing,Sales Counter & Cust Service

write list = dedi,cs,salescounter01,salescounter02,salescounter03,salescounter04,

edp,mgr01,bsa

valid user = dedi,cs,salescounter01,salescounter02,salescounter03,salescounter04,

edp,mgr01,bsa

create mode = 0600

directory mode = 0771

veto files = /*.mp3/*.mpg/*.exe

[Warehouse]

path = /home/samba/Warehouse

comment = Warehouse

write list = dedi,warehouse,mgr01,mgr03bsa

valid users = dedi,warehouse,mgr01,mgr03bsa

create mode = 0600

directory mode = 0771

veto files = /*.mp3/*.mp4/*.avi/*/mpg/*.exe/

## user : warehouse

## pass : warehouse*sb

[netlogon]

comment = Network Logon Service

path = /home/samba/netlogon

admin users = Administrator

valid users = %U

read only = no

[profile]

comment = user profiles

path = /home/samba/profiles

valid users = %U

create mask = 0700

directory mask = 0700

browsable = no

[BackupIT]

#delete readonly = yes

comment = IT & MIS

path = /home/samba/BackupIT

force group = users

create mode = 0600

valid users = dedi,edp,mgr01

write list = dedi,edp,mgr01

browsable = yes

writeable = yes

max connections = 3

directory mode = 0771

##->User yg berhak mengakses

##->Permision status utk file yg br di buat di samba folder

## user : dedi : ghostridah

## user : edp : edp01

[Installer]

comment = Share Installer

path = /home/samba/installer

valid users = %U

force group = users

veto files = /*.mp3/*.avi/*.mpg

browsable = yes

## file di installer tidak bs di hapus

Restart samba

root@library:/# /etc/init.d/restart samba

Edit file

root@library:/# nano /etc/nsswitch.conf

Tambahkan wins di host

Host : files wins dns

Mendaftarkan user root ke dalam user samba

root@library:/# smbpasswd –a root

root@library:/# New SMB Password (Masukan password root di samba,saya menggunakan pass n3ptun3)

root@library:/# Retype ( Ulangi password root di samba )

buat file /etc/samba/smb.user lalu isikan dengan

root = administrators

Restart samba

root@library:/# /etc/init.d/samba restart

Perintah Untuk mengecek hasil konfigurasi samba tadi

root@library:/# smbclient –L localhost –U%

Daftarkan masing-masing user atau staff untuk bisa masuk ke server samba

menambahkan user ke sistem linux

Contoh memaasukan dengan nama user dedi

root@library:/# useradd dedi –m –G users

memberikan password ke user dedi

root@library:/# passwd dedi

menambahkan user dedi ke sistem samba

root@library:/# smbpasswd –a dedi

Restart Samba

root@library:/# /etc/init.d/samba restart

Langkah Yang terakhir dalah dengan menjoinkan mesin windows ke pdc linux kita, dengan cara

( Testing Dengan Windows XP )
click kanan pada mycomputer
pilih computer name lalu change
masukan domain PDC pada bagisn domain
akan muncul windows yang meminta memasukan user dan password, pada langkah ini masukan user root dan password samba untuk user root
OK
Akan muncul bahwa kita sukses menjoinkan mesin windows ke PDC linux

Jika komputer klien menggunakan Windows XP lakukan sedikit modifikasi terlebih dahulu, berupa langkah-langkah :

1. Buka regedit
START | RUN | REGEDIT

2. Cari entry HKLM (HKEY_LOCAL MACHINE) – SYSTEM – CurrentControlSet – Service Netlogon – Parameters

3. Klik pada windows sebelah kanan, klik kanan pilih New – DWORD value, namanya requiresignorseal, valuenya 0.

4. Kalau entry tersebut sudah ada namun bernilai 1, ganti menjadi 0

5. Tutup regedit

Installasi Quota

Install aplikasi quota

root@library:/# apt-get install quota

Edit File di /etc/fstab

root@library:/# nano /etc/fstab

tambahkan usrquota dan grpqota di dev/sda3

=remount-ro,usrquota,grpquota_ 0 1

Buat file yang menampung konfigurasi quota

Buat file ‘qota.user’ dan ‘qouta.group’

root@library:/# touch /quota.user /quota.group

Ubah Hak akses file ‘quota.user’ dan ‘quota.group’

root@library:/# chmod 600 /qota.*

Remount Patisi root

root@library:/# mount –o remont /

Mengecek struktur partisi root yang menerapkan Quota

root@library:/# quotacheck –avugm

Mangaktifkan Quota

root@library:/# quotaon-avug

Menambahkan quota ke user

Contoh : user dedi

root@library:/# edquota –u dedi

Sesuaikan kebutuhan quota pada masing-masing user

Selesai🙂 Fiuhhhh

4 thoughts on “Membangun File Server & PDC di Ubuntu Server

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