SAMBA
Untuk membuat file server (server data), dengan server menggunakan sistem operasi Linux dan client menggunakan sistem operasi windows perlu adanya
penghubung antar kedua sistem operasi tersebut. yaitu dengan menggunakan samba (smb) yang ada pada sistem operasi linux.
buka terminal kemudian ketikan seperti di bawah ini tuk masuk ke configurasi samba.
server:#gedit /etc/samba/smb.conf
edit sesuai dengan kebutuhan anda, kemudian save.
selanjutnya restart hasil configurasi anda.
server:# /etc/init.d/samba restart
Contoh configurasi samba….
#### Browsing/Identification ###
[global]
workgroup = file-server
server string = Server
wins support = yes
dns proxy = no
name resolve order = wins bcast host
username map = /etc/samba/smbusers
oplocks = yes
inherit permissions = yes
###### Reject Some File Extension To Be Saved
veto files = /*.pif/*.mp3/*.com/*.db/*.avi/*.mpg/*.mpeg/*.{*}/
########## Networking ###########
; interfaces = 127.0.0.0/8 eth0
; bind interfaces only = true
##### Debugging/Accounting ######
log file = /var/log/samba/log.%m
log level = 3
max log size = 1000
; syslog only = no
syslog = 1
panic action = /usr/share/samba/panic-action %d
######### Authentication ########
security = user
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
; guest account = nobody
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
########### Domains ############
netbios name = mulia
domain logons = yes
domain master = yes
local master = yes
preferred master = yes
os level = 65
logon path =
logon drive = Z:
logon home = \\%N\%U
logon script = %U.bat
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 = 10000-20000
idmap gid = 10000-20000
######### Misc Options ##########
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192
time server = yes
; do not show files starting with dots
hide dot files = yes
####### Share Definitions #######
[homes]
comment = %U Home Directory
path = /home/samba/users/%U
browseable = yes
writeable = yes
valid users = %U
[Users]
writeable = yes
path = /home/samba/users
write list = @users
comment = Home Directory
valid users = @users
user = @users
[allusers]
writeable = yes
path = /home/shares/allusers
force group = users
create mask = 0660
comment = All Users
directory mask = 0771
valid users = @users
[netlogon]
comment = Network Logon Service
path = /home/samba/netlogon
admin users = root Administrator
valid users = %U
browseable = yes
read only = yes
[Temp]
path = /home/samba/data/Temp
comment = Temporary Directory
browseable = yes
writable = yes
valid users = %U
[sales]
comment = sales Data
writeable = yes
valid users = sales
user =@sales
write list = @sales
path = /home/samba/sales
[secretary]
writeable = yes
path = /home/samba/secretary
write list = @secretary,@it
comment = secretary Data
valid users = @secretary
user =secretary
[purchasing]
comment = purchasing Data
valid users = @users
writeable = yes
user=@purchasing
path = /home/samba/purchasing
write list = @purchasing
[accounting]
writeable = yes
path = /home/samba/accounting
write list = @accounting
comment = accounting Data
valid users = @accounting
user = @accounting
[hrd]
comment = hrd Data
writeable = yes
valid users = @hrd
user = @hrd
write list = hrd
path = /home/samba/hrd
———————————————————–
kemudian bwt direktorinya..
mkdir /home/samba
mkdir /home/samba/netlogon
mkdir /home/samba/profiles
mkdir /home/samba/sales
mkdir /home/samba/secretary
mkdir /home/samba/purchasing
mkdir/home/samba/hrd
chmod 777 /var/spool/samba
shown -R root:users /home/samba
chmod -R 771 /home/samba
Selanjutnya ketik
server:# gedit /etc/nsswitch.conf
ubah hosts:files dns
menjadi hosts:files wins dns
Tahap selanjutnya membuat user root
server:# smbpasswd -a root
dan ketikan passwd untuk root
Buat file /etc/samba/smbusers lalu jalankan :
echo “root = Administrator” > /etc/samba/smbusers
mengartikan bahwa user root = user administrator pada windows
Test settingan kita dah benar :
smbclient -L localhost -U%
buat user linux dan user samba dengan cara :
user linux :
useradd aris -m -G users
user samba :
smbpasswd -a aris
tahap terakhir restart samba
server:# /etc/init.d/samba restart
lalu pada komputer user kita coba untuk masuk ke domain yg kita buat
– click kanan pada mycomputer
– pilih computer name lalu change
– masukan domain PDC pada bagian domain
– masukan user dan password samba
– Akan muncul bahwa kita sukses menjoinkan mesin windows ke PDC linux
Nb: untuk configurasi group,user, yang berbentuk GUI bisa instalasi webwin
http://www.webmin.com/download.html
Tinggalkan komentar