Install paket samba untuk versi yang terbaru
#apt-get install samba
Mengedit script smb.conf
#pico /etc/samba/smb.conf
#=================== Global Settings ====================
[global]
workgroup = kel7 —-> nama workgroup yang muncul nantinya
server string = %h server
dns proxy = no
interfaces = 192.168.2.1/8 eth0 —> eth0 merupakan LANcard,bisa diganti menurut medianya
bind interfaces only = true
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
###### Authentication #######
security = user —> hanya untuk user yang terdaftar.
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
passwd program = /usr/bin/passwd %u
passwd chat = *EntersnewsUNIXspassword:* %nn *RetypesnewsUNIXspassword:* %nn *passwordsupdatedssuccessfully* .
#==================== Share Definitions ====================
[data] —> menentukan nama filesharing
path = /media/repo/ —> path tempat folder dishare
guest ol = no – —> akses guest ditolak, untuk menghidupkan ganti dengan yes
browseable = yes —> bisa dibrowsing
read-only = no —> read-only memiliki opsi yes atau no
valid-users = kel7, root —-> list user yang memiliki akses
writeable = yes —> bisa ditulis.
create mask = 700 —-> hak membuat file
directory mask = 700 —-> hak membuat direktori
[my data]
path = /media/
guest ol = yes
browsable = yes
read-only = no
writeable = yes
valid users = kel7,root
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
public = no
writable = no
create mode = 0700
# Sharing Printer Windows clients look for this share name as a source of downloadable
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
writable = yes
guest ok = no —-> guest dilarang masuk
write list = root, @ntadmin
# Sharing CD-ROM with others.
[cdrom]
comment = Samba server’s CD-ROM
writable = no
locking = no
path = /cdrom
public = yes —-> public berarti bebas dipakai oleh siapa saja
Merestart daemon Samba
#/etc/init.d/samba restart
Untuk test apakah konfigurasi kita sudah berhasil, lakukan pengecekan menggunakan search computers or people a computer on the network ketikkan alamat IP kita
#apt-get install samba
Mengedit script smb.conf
#pico /etc/samba/smb.conf
#=================== Global Settings ====================
[global]
workgroup = kel7 —-> nama workgroup yang muncul nantinya
server string = %h server
dns proxy = no
interfaces = 192.168.2.1/8 eth0 —> eth0 merupakan LANcard,bisa diganti menurut medianya
bind interfaces only = true
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
###### Authentication #######
security = user —> hanya untuk user yang terdaftar.
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
passwd program = /usr/bin/passwd %u
passwd chat = *EntersnewsUNIXspassword:* %nn *RetypesnewsUNIXspassword:* %nn *passwordsupdatedssuccessfully* .
#==================== Share Definitions ====================
[data] —> menentukan nama filesharing
path = /media/repo/ —> path tempat folder dishare
guest ol = no – —> akses guest ditolak, untuk menghidupkan ganti dengan yes
browseable = yes —> bisa dibrowsing
read-only = no —> read-only memiliki opsi yes atau no
valid-users = kel7, root —-> list user yang memiliki akses
writeable = yes —> bisa ditulis.
create mask = 700 —-> hak membuat file
directory mask = 700 —-> hak membuat direktori
[my data]
path = /media/
guest ol = yes
browsable = yes
read-only = no
writeable = yes
valid users = kel7,root
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
public = no
writable = no
create mode = 0700
# Sharing Printer Windows clients look for this share name as a source of downloadable
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
writable = yes
guest ok = no —-> guest dilarang masuk
write list = root, @ntadmin
# Sharing CD-ROM with others.
[cdrom]
comment = Samba server’s CD-ROM
writable = no
locking = no
path = /cdrom
public = yes —-> public berarti bebas dipakai oleh siapa saja
Merestart daemon Samba
#/etc/init.d/samba restart
Untuk test apakah konfigurasi kita sudah berhasil, lakukan pengecekan menggunakan search computers or people a computer on the network ketikkan alamat IP kita