Share pengalaman waktu bikin PDC dengan Samba di ubuntu ii, yang dibantu juga sama temen2 di milist ubuntu dan artikel2 yg dah ditulisin di internet.. Tanpa membuang waktu, siapin susu anget (maklum, gak ngopi :D),cemilan,rokok,lagu biar gak serius2 amat :p,..
Masuk ke terminal (soalnya pake ubuntu desktop, bukan pake ubuntu server bikinnya huhu).. OK lanjut:
Pertama-tama install semua paket sambanya:
ale@heaven: sudo apt-get install samba samba-doc smbclient samba-common smbfs
Bikin directory untuk samba :
ale@heaven: sudo mkdir /home/samba
ale@heaven: sudo mkdir /home/samba/profiles
ale@heaven: sudo mkdir /home/samba/netlogon
ale@heaven: sudo mkdir /var/spool/samba
ale@heaven: sudo chmod 777 /var/spool/samba
ale@heaven: sudo chown -R root.users /home/samba
ale@heaven: sudo chmod -R 771 /home/samba
edit file smb.conf tp biasakan backup file aslinya :) :
ale@heaven: sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.asli
ale@heaven: sudo nano /etc/samba/smb.conf
Berikut smb.conf pada saya, silahkan diganti sesuai dengan kebutuhan :
# aLe Testing samba PDC part 2
# 051108
[global]
workgroup = black
server string = %h server (Samba, black)
netbios name = blackserver
wins support = true
dns proxy = no
name resolve order = hosts wins bcast
username map = /etc/samba/smbusers
## Networking
#interfaces = 192.168.2.0/24 eth0
#bind interfaces only = true
## Debugging
log file = /var/log/samba/log.%m
max log size = 1000
syslog only = no
panic action = /usr/share/samba/panic-action %d
## Autentikasi
security = user
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
#guest account = nobody
#invalid users = root
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
## Domain
domain logons = yes
logon path = \\%L\profiles\%U
domain logons = yes
logon path = \\%L\profiles\%U
logon drive = H:
logon home = \\%L\%U
logon script = logon.cmd
## Script user
add user script = /usr/sbin/useradd %u
add group script = /usr/sbin/groupadd %g
add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
delete user script = /usr/sbin/userdel %u
delete user from group script = /usr/sbin/deluser %u %g
delete group script = /usr/sbin/groupdel %g
## Misc
#include = /etc/samba/smb.conf.%m
socket options = TCP_NODELAY
domain master = yes
idmap backend = idmap_rid:black=1000-65000
idmap uid = 1000-65000
idmap gid = 1000-65000
template shell = /bin/bash
winbind enum groups = yes
winbind enum users = yes
usershare max shares = 100
usershare allow guests = yes
## Share
[homes]
comment = Home Directories
browseable = no
read only = no
create mask = 0700
directory mask = 0700
valid users = %U
[netlogon]
comment = Network Logon Service
path = /home/samba/netlogon
guest ok = yes
read only = yes
share modes = no
[profiles]
comment = User Profiles
path = /home/samba/profiles
valid users = %U
guest ok = no
browseable = no
# create mask = 0600
# directory mask = 0700
writable = yes
[Shares]
comment = Share user
path = /home/shares/allusers
writable = yes
public = yes
simpan (ctrl+O) dan keluar (ctrl+X)
Debug konfigurasi samba :
ale@heaven: testparm
samba sudah terkonfigurasi, kita lanjut ke tahap selanjutnya :
Tambahkan PC client di /etc/hosts
ale@heaven: nano /etc/hosts
tambahkan, misal :
192.168.2.20 black
192.168.2.21 blacklist
192.168.2.22 blackeyes
simpan (ctrl+O) dan keluar (ctrl+X)
Bikin file smbusers
ale@heaven:sudo nano /etc/samba/smbusers
tuliskan :
root = Administrators
simpan (ctrl+O) dan keluar (ctrl+X)
langkah berikutnya mapping group untuk windows:
ale@heaven:sudo Net groupmap add ntgroup="Domain Admins" unixgroup=root
ale@heaven:sudo Net groupmap add ntgroup="Domain Users" unixgroup=users
ale@heaven:sudo Net groupmap add ntgroup="Domain Guest" unixgroup=nobody
Restart samba :
ale@heaven: sudo /etc/init.d/samba restart
tambahkan user root di samba :
ale@heaven:sudo smbpasswd -a root
tambahkan user untuk linux dan samba :
ale@heaven: sudo useradd black -m -G users -c "blackliong"
ale@heaven: sudo smbpasswd -a black
ale@heaven: sudo mkdir /home/samba/profiles/black
ale@heaven: sudo chown black.users /home/samba/profiles/black
ale@heaven: sudo chmod 700 /home/samba/profiles/black
restart lagi sambanya akhhh
ale@heaven: sudo /etc/init.d/samba restart
BERES dahhh,.. sekarang waktunya tester :
Login ke win XP, klik kanan di my computer --> properties pilih tab computer name --> change..
tick pada domain masukkan black (sesuai workgroup di samba) kemudian OK.. akan ditanya password, isikan dengan username root dan password samba root yang sudah kita buat tadi.. tarra, dah bisa deh PDC kita pake samba :D, yang katanya perfomance lebih ngacir huhuhu..
Gudluck ;)
Masuk ke terminal (soalnya pake ubuntu desktop, bukan pake ubuntu server bikinnya huhu).. OK lanjut:
Pertama-tama install semua paket sambanya:
ale@heaven: sudo apt-get install samba samba-doc smbclient samba-common smbfs
Bikin directory untuk samba :
ale@heaven: sudo mkdir /home/samba
ale@heaven: sudo mkdir /home/samba/profiles
ale@heaven: sudo mkdir /home/samba/netlogon
ale@heaven: sudo mkdir /var/spool/samba
ale@heaven: sudo chmod 777 /var/spool/samba
ale@heaven: sudo chown -R root.users /home/samba
ale@heaven: sudo chmod -R 771 /home/samba
edit file smb.conf tp biasakan backup file aslinya :) :
ale@heaven: sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.asli
ale@heaven: sudo nano /etc/samba/smb.conf
Berikut smb.conf pada saya, silahkan diganti sesuai dengan kebutuhan :
# aLe Testing samba PDC part 2
# 051108
[global]
workgroup = black
server string = %h server (Samba, black)
netbios name = blackserver
wins support = true
dns proxy = no
name resolve order = hosts wins bcast
username map = /etc/samba/smbusers
## Networking
#interfaces = 192.168.2.0/24 eth0
#bind interfaces only = true
## Debugging
log file = /var/log/samba/log.%m
max log size = 1000
syslog only = no
panic action = /usr/share/samba/panic-action %d
## Autentikasi
security = user
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
#guest account = nobody
#invalid users = root
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
## Domain
domain logons = yes
logon path = \\%L\profiles\%U
domain logons = yes
logon path = \\%L\profiles\%U
logon drive = H:
logon home = \\%L\%U
logon script = logon.cmd
## Script user
add user script = /usr/sbin/useradd %u
add group script = /usr/sbin/groupadd %g
add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
delete user script = /usr/sbin/userdel %u
delete user from group script = /usr/sbin/deluser %u %g
delete group script = /usr/sbin/groupdel %g
## Misc
#include = /etc/samba/smb.conf.%m
socket options = TCP_NODELAY
domain master = yes
idmap backend = idmap_rid:black=1000-65000
idmap uid = 1000-65000
idmap gid = 1000-65000
template shell = /bin/bash
winbind enum groups = yes
winbind enum users = yes
usershare max shares = 100
usershare allow guests = yes
## Share
[homes]
comment = Home Directories
browseable = no
read only = no
create mask = 0700
directory mask = 0700
valid users = %U
[netlogon]
comment = Network Logon Service
path = /home/samba/netlogon
guest ok = yes
read only = yes
share modes = no
[profiles]
comment = User Profiles
path = /home/samba/profiles
valid users = %U
guest ok = no
browseable = no
# create mask = 0600
# directory mask = 0700
writable = yes
[Shares]
comment = Share user
path = /home/shares/allusers
writable = yes
public = yes
simpan (ctrl+O) dan keluar (ctrl+X)
Debug konfigurasi samba :
ale@heaven: testparm
samba sudah terkonfigurasi, kita lanjut ke tahap selanjutnya :
Tambahkan PC client di /etc/hosts
ale@heaven: nano /etc/hosts
tambahkan, misal :
192.168.2.20 black
192.168.2.21 blacklist
192.168.2.22 blackeyes
simpan (ctrl+O) dan keluar (ctrl+X)
Bikin file smbusers
ale@heaven:sudo nano /etc/samba/smbusers
tuliskan :
root = Administrators
simpan (ctrl+O) dan keluar (ctrl+X)
langkah berikutnya mapping group untuk windows:
ale@heaven:sudo Net groupmap add ntgroup="Domain Admins" unixgroup=root
ale@heaven:sudo Net groupmap add ntgroup="Domain Users" unixgroup=users
ale@heaven:sudo Net groupmap add ntgroup="Domain Guest" unixgroup=nobody
Restart samba :
ale@heaven: sudo /etc/init.d/samba restart
tambahkan user root di samba :
ale@heaven:sudo smbpasswd -a root
tambahkan user untuk linux dan samba :
ale@heaven: sudo useradd black -m -G users -c "blackliong"
ale@heaven: sudo smbpasswd -a black
ale@heaven: sudo mkdir /home/samba/profiles/black
ale@heaven: sudo chown black.users /home/samba/profiles/black
ale@heaven: sudo chmod 700 /home/samba/profiles/black
restart lagi sambanya akhhh
ale@heaven: sudo /etc/init.d/samba restart
BERES dahhh,.. sekarang waktunya tester :
Login ke win XP, klik kanan di my computer --> properties pilih tab computer name --> change..
tick pada domain masukkan black (sesuai workgroup di samba) kemudian OK.. akan ditanya password, isikan dengan username root dan password samba root yang sudah kita buat tadi.. tarra, dah bisa deh PDC kita pake samba :D, yang katanya perfomance lebih ngacir huhuhu..
Gudluck ;)
0 komentar:
Posting Komentar