smb.conf/examples/2006: Difference between revisions

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
m Example 1: Camilla: using indent instead of pre, to allow for links
tidying after move
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Computing]]: [[Linux]]: [[Samba]]: [[smb.conf]]: [[smb.conf examples|examples]]
This is an example from Camilla in January 2006.
==Example 1: Camilla==
There's probably a lot of garbage that doesn't need to be in here, but this setup basically works for anonymous connections from Win9x machines. I don't think the DNS Proxy parameter did anything, though.


# This is the main Samba configuration file. You should read the
There's probably a lot of garbage that doesn't need to be in here, but this setup basically works for anonymous connections from [[Win9x]] machines. I don't think the DNS Proxy parameter did anything, though.
# smb.conf(5) manual page in order to understand the options listed
==Contents==
# here. Samba has a huge number of configurable options (perhaps too
<code>
# many!) most of which are not shown in this example
# This is the main Samba configuration file. You should read the
#
# smb.conf(5) manual page in order to understand the options listed
# NOTE: Whenever you modify this file you should run the command "testparm"
# here. Samba has a huge number of configurable options (perhaps too
# to check that you have not made any basic syntactic errors.
# many!) most of which are not shown in this example
#
#
#======================= Global Settings =====================================
# NOTE: Whenever you modify this file you should run the command "testparm"
[global]
# to check that you have not made any basic syntactic errors.
message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
#
#======================= Global Settings =====================================
# WINS server (2005-05-09)
[global]
# Causes Samba to act as WINS server, which turns network names into IP addresses.
message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
wins support = yes
 
# WINS server (2005-05-09)
# workgroup = NT-Domain-Name or Workgroup-Name
# Causes Samba to act as WINS server, which turns network names into IP addresses.
workgroup = pinecrest
wins support = yes
# server string is the equivalent of the NT Description field
 
server string = Camilla II
# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = pinecrest
# Opportunistic Locking
# server string is the equivalent of the NT Description field
# NO reduces performance but prevents flaky Windows apps from corrupting files:
server string = Camilla II
# YES allows this file to not generate warnings
 
oplocks = yes
# Opportunistic Locking
# NO reduces performance but prevents flaky Windows apps from corrupting files:
printcap name = /etc/printcap
# YES allows this file to not generate warnings
oplocks = yes
log file = /var/log/samba/%m.log
 
max log size = 50
printcap name = /etc/printcap
smb passwd file = /etc/samba/[[smbpasswd]]
 
log file = /var/log/samba/%m.log
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
max log size = 50
smb passwd file = /etc/samba/[[smbpasswd]]
local master = yes
 
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
# 2006-01-22 Woozle - xlates NetBIOS names to DNS, maybe?
 
dns proxy = yes
local master = yes
# added 2004-08-28 per phealy suggestion
 
guest account = sambaguest
# 2006-01-22 Woozle - xlates NetBIOS names to DNS, maybe?
winbind uid = 16777216-33554431
dns proxy = yes
winbind gid = 16777216-33554431
# added 2004-08-28 per phealy suggestion
password server = None
guest account = sambaguest
guest ok = yes
winbind uid = 16777216-33554431
security = SHARE
winbind gid = 16777216-33554431
username map = /etc/samba/[[smbusers]]
password server = None
# pwh added line above
guest ok = yes
# added 2006-01-13 per Tenebram suggestion
security = SHARE
force group = lanusers
username map = /etc/samba/[[smbusers]]
force create mode = 0060
# pwh added line above
create mask = 0775
# added 2006-01-13 per Tenebram suggestion
force group = lanusers
[homes]
force create mode = 0060
comment = Home Directories
create mask = 0775
read only = no
 
path = /home
[homes]
comment = Home Directories
# NOTE: If you have a BSD-style print system there is no need to
read only = no
# specifically define each individual printer
path = /home
[printers]
 
comment = All Printers
# NOTE: If you have a BSD-style print system there is no need to
path = /var/spool/samba
# specifically define each individual printer
# Set public = yes to allow user 'guest account' to print
[printers]
printable = yes
comment = All Printers
path = /var/spool/samba
[Files]
# Set public = yes to allow user 'guest account' to print
comment = File system, read-only
printable = yes
path = /
 
available = yes
[Files]
browseable = yes
comment = File system, read-only
guest ok = no
path = /
available = yes
[Public]
browseable = yes
path = /usr/netpublic
guest ok = no
read only = no
 
case sensitive = no
[Public]
msdfs proxy = no
path = /usr/netpublic
map archive = no
read only = no
#create mask = 0774
case sensitive = no
#directory mask = 0775
msdfs proxy = no
# allows samba to show/include symbolic-linked folders and files:
map archive = no
follow symlinks = yes
#create mask = 0774
# allows links to targets not within the shared folder
#directory mask = 0775
wide links = yes
# allows samba to show/include symbolic-linked folders and files:
# allows e.g. ".htaccess" to be seen
follow symlinks = yes
hide dot files = no
# allows links to targets not within the shared folder
wide links = yes
[STUFF]
# allows e.g. ".htaccess" to be seen
path = /home/woozle/stuff
hide dot files = no
available = yes
 
read only = no
[STUFF]
case sensitive = no
path = /home/woozle/stuff
msdfs proxy = no
available = yes
comment = and things
read only = no
# allows samba to show/include symbolic-linked folders and files:
case sensitive = no
follow symlinks = yes
msdfs proxy = no
# allows links to targets not within the shared folder
comment = and things
wide links = yes
# allows samba to show/include symbolic-linked folders and files:
# allows e.g. ".htaccess" to be seen
follow symlinks = yes
hide dot files = no
# allows links to targets not within the shared folder
# creates files as writable by group
wide links = yes
#force create mode = 666
# allows e.g. ".htaccess" to be seen
hide dot files = no
# creates files as writable by group
#force create mode = 666
</code>

Latest revision as of 23:00, 25 May 2010

This is an example from Camilla in January 2006.

There's probably a lot of garbage that doesn't need to be in here, but this setup basically works for anonymous connections from Win9x machines. I don't think the DNS Proxy parameter did anything, though.

Contents

  1. This is the main Samba configuration file. You should read the
  2. smb.conf(5) manual page in order to understand the options listed
  3. here. Samba has a huge number of configurable options (perhaps too
  4. many!) most of which are not shown in this example
  5. NOTE: Whenever you modify this file you should run the command "testparm"
  6. to check that you have not made any basic syntactic errors.
  7. ======================= Global Settings =====================================

[global] message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &

  1. WINS server (2005-05-09)
  2. Causes Samba to act as WINS server, which turns network names into IP addresses.

wins support = yes

  1. workgroup = NT-Domain-Name or Workgroup-Name

workgroup = pinecrest

  1. server string is the equivalent of the NT Description field

server string = Camilla II

  1. Opportunistic Locking
  2. NO reduces performance but prevents flaky Windows apps from corrupting files:
  3. YES allows this file to not generate warnings

oplocks = yes

printcap name = /etc/printcap

log file = /var/log/samba/%m.log max log size = 50 smb passwd file = /etc/samba/smbpasswd

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

local master = yes

  1. 2006-01-22 Woozle - xlates NetBIOS names to DNS, maybe?

dns proxy = yes

  1. added 2004-08-28 per phealy suggestion

guest account = sambaguest winbind uid = 16777216-33554431 winbind gid = 16777216-33554431 password server = None guest ok = yes security = SHARE username map = /etc/samba/smbusers

  1. pwh added line above
  2. added 2006-01-13 per Tenebram suggestion

force group = lanusers force create mode = 0060 create mask = 0775

[homes] comment = Home Directories read only = no path = /home

  1. NOTE: If you have a BSD-style print system there is no need to
  2. specifically define each individual printer

[printers] comment = All Printers path = /var/spool/samba

  1. Set public = yes to allow user 'guest account' to print

printable = yes

[Files] comment = File system, read-only path = / available = yes browseable = yes guest ok = no

[Public] path = /usr/netpublic read only = no case sensitive = no msdfs proxy = no map archive = no

  1. create mask = 0774
  2. directory mask = 0775
  3. allows samba to show/include symbolic-linked folders and files:

follow symlinks = yes

  1. allows links to targets not within the shared folder

wide links = yes

  1. allows e.g. ".htaccess" to be seen

hide dot files = no

[STUFF] path = /home/woozle/stuff available = yes read only = no case sensitive = no msdfs proxy = no comment = and things

  1. allows samba to show/include symbolic-linked folders and files:

follow symlinks = yes

  1. allows links to targets not within the shared folder

wide links = yes

  1. allows e.g. ".htaccess" to be seen

hide dot files = no

  1. creates files as writable by group
  2. force create mode = 666