Edit the script to suit your needs. The (#, ;) means comment remove them to make the line active. The above printed script is totally functional. You may follow it as a template to configure yours. Each section is explained as follows:
- [Global]
Here is where you declare the group name, the NetBios name; how you want this to appear in network neighborhood -the default is set to host name.
workgroup = MDKGROUP
netbios name = xxxx
server string = Samba Server %v
- [Printer]
This section enables your printer for samba, required if you need to print to any printer connected to the Linux box.
Printcap name = lpstat
Load printers = yes
Printing = cups
Check at the bottom of this script, there are other options for printers and by default they are enabled.
- [Logs]
Enables logging for each machine that connects to samba server
Log file = /var/log/samba/log.%m
Max log size = 50
- [Host that are allowed to connect to this server]
Enter single hosts here if you need it per host or a subnet mask.
hosts allow = 168.34.26.62
- Browser control and networking options:
You may also use per interfaces, note that each interface represenst a complete network (subnet).
Interfaces = 192.168.12.2 /24 192.168.13.2/24
- [Security]
Uncomment this line to enable security mode (user level)
security = user
- [Password]
Enable the password restriction, forcing it to be number of characters required, as well as the username. Password must be encrypted.
password level = 8
username level = 8
encrypt password = yes
smb passwd file = /etc/samba/smbpasswd
- [Private home]
--------------------------------------------------------------------------------------
# A private directory, usable only by me. Note that I required
# write access to the directory Documents.
;[fredsdir]
[Agustin]
comment = Agustin Private Files
path = /home/agustin/Documents
valid users = agustin
public = no
writable = yes
printable = no
------------------------------------------------------------------------
[Public]
# A public directory, usable by all. Note that it has
# write access to the directory public.
[public]
path = /usr/somewhere/else/public
public = yes
only guest = yes
writable = yes
printable = no
|