Menjalankan Samba sebagai Primary Domain Controller (PDC)
July 28th, 2005
1. Konfigurasi file smb.conf
samba_script”.Untuk menjalankan samba sebagai PDC, kita perlu menambahkan beberapa entri ke file smb.conf :
[global] domain logons = yes security = user os level = 99[netlogon]
path = /usr/local/samba/netlogon
2. Menggabungkan dengan Windows XP
samba_script”.Mesin Windows XP harus mempunyai nama NetBIOS yang unik yang tidak sama dengan nama pemakai. Kemudian buat modifikasi pada register dan restart :
[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesNetlogonParameters] “requiresignorseal”=dword:00000000
pc14$:x:400:400:Workstation:/dev/null:/bin/false
/usr/local/samba/bin/smbpasswd -m -a pc14
/usr/local/samba/bin/smbpasswd -a root
3. Pencegahan Logon yang bersamaan
==========================================================#!/bin/sh
# add to your crontab: */1 * * * * /cronpath/thisfile.sh 1>/dev/null PATH=/usr/bin:/bin:/usr/local/samba/binLOGIN_NAMES=`smbstatus -b | egrep ”^[0-9]+” | awk -F” +” ’ { print $2 } ’ | sort | uniq -d`
LOGIN_COUNT=`echo $LOGIN_NAMES | wc -l` if [ $LOGIN_COUNT -ne 0 ]; then # Check if it’s logged in twice from the same machine for item in $(echo $LOGIN_NAMES); do DUPE_COUNT=`smbstatus -b | grep $item | awk -F” +” ’ { print $2” ”$3 } ’ | sort | uniq -u | wc -l` if [ $DUPE_COUNT -ne 0 ]; then # Same user logged into more than one workstation echo ”$item: Duplicate login found on different workstation” echo “Disabling user…” smbpasswd -d $item for item2 in $(smbstatus -b | grep $item | cut -d ’ ’ -f1); do echo “Killing their process ($item2)” kill -9 $item2 done echo “Notifying administrator…” cat /dev/null | mail -s ”$item SMB lockout” root echo fi done fi
===================================================
Semoga Bermanfaat
Translate dari Samba Tutorial, author David Lechnyr, David@lechnyr.com
Entry Filed under: Jaringan Komputer, Linux, Tutorial, Bebas
1 Komentar Tambahkan Sendiri
1. tigis | July 29th, 2005 at 10:05 pm
lieur tenann…
Komentar
Kode HTML yang di izinkan:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
Track posting ini | Berlangganan Komentar ini menggunakan RSS