Difference between revisions of "smb.conf/examples/2006"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
m (moved smb.conf examples to smb.conf/examples/2006: reorganizing; have new working example to add)
(tidying after move)
 
Line 1: Line 1:
=={{hide|Navigation}}==
+
This is an example from Camilla in January 2006.
[[computing]]: [[Linux]]: [[Samba]]: [[smb.conf]]: [[smb.conf examples|examples]]
+
 
==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.
 
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==
 +
<code>
 +
# This is the main Samba configuration file. You should read the
 +
# smb.conf(5) manual page in order to understand the options listed
 +
# here. Samba has a huge number of configurable options (perhaps too
 +
# many!) most of which are not shown in this example
 +
#
 +
# NOTE: Whenever you modify this file you should run the command "testparm"
 +
# to check that you have not made any basic syntactic errors.
 +
#
 +
#======================= Global Settings =====================================
 +
[global]
 +
message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
 +
 +
# WINS server (2005-05-09)
 +
# Causes Samba to act as WINS server, which turns network names into IP addresses.
 +
wins support = yes
 +
 +
# workgroup = NT-Domain-Name or Workgroup-Name
 +
workgroup = pinecrest
 +
# server string is the equivalent of the NT Description field
 +
server string = Camilla II
 +
 +
# Opportunistic Locking
 +
# NO reduces performance but prevents flaky Windows apps from corrupting files:
 +
# 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
 +
 +
# 2006-01-22 Woozle - xlates NetBIOS names to DNS, maybe?
 +
dns proxy = yes
 +
# 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]]
 +
# pwh added line above
 +
# 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
 +
 +
# NOTE: If you have a BSD-style print system there is no need to
 +
# specifically define each individual printer
 +
[printers]
 +
comment = All Printers
 +
path = /var/spool/samba
 +
# 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
 +
#create mask = 0774
 +
#directory mask = 0775
 +
# allows samba to show/include symbolic-linked folders and files:
 +
follow symlinks = yes
 +
# allows links to targets not within the shared folder
 +
wide links = yes
 +
# allows e.g. ".htaccess" to be seen
 +
hide dot files = no
  
# This is the main Samba configuration file. You should read the
+
[STUFF]
# smb.conf(5) manual page in order to understand the options listed
+
path = /home/woozle/stuff
# here. Samba has a huge number of configurable options (perhaps too
+
available = yes
# many!) most of which are not shown in this example
+
read only = no
#
+
case sensitive = no
# NOTE: Whenever you modify this file you should run the command "testparm"
+
msdfs proxy = no
# to check that you have not made any basic syntactic errors.
+
comment = and things
#
+
# allows samba to show/include symbolic-linked folders and files:
#======================= Global Settings =====================================
+
follow symlinks = yes
[global]
+
# allows links to targets not within the shared folder
message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
+
wide links = yes
+
# allows e.g. ".htaccess" to be seen
# WINS server (2005-05-09)
+
hide dot files = no
# Causes Samba to act as WINS server, which turns network names into IP addresses.
+
# creates files as writable by group
wins support = yes
+
#force create mode = 666
+
</code>
# workgroup = NT-Domain-Name or Workgroup-Name
 
workgroup = pinecrest
 
# server string is the equivalent of the NT Description field
 
server string = Camilla II
 
 
# Opportunistic Locking
 
# NO reduces performance but prevents flaky Windows apps from corrupting files:
 
# 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
 
 
# 2006-01-22 Woozle - xlates NetBIOS names to DNS, maybe?
 
dns proxy = yes
 
# 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]]
 
# pwh added line above
 
# 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
 
 
# NOTE: If you have a BSD-style print system there is no need to
 
# specifically define each individual printer
 
[printers]
 
comment = All Printers
 
path = /var/spool/samba
 
# 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
 
#create mask = 0774
 
#directory mask = 0775
 
# allows samba to show/include symbolic-linked folders and files:
 
follow symlinks = yes
 
# allows links to targets not within the shared folder
 
wide links = yes
 
# 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
 
# allows samba to show/include symbolic-linked folders and files:
 
follow symlinks = yes
 
# allows links to targets not within the shared folder
 
wide links = yes
 
# allows e.g. ".htaccess" to be seen
 
hide dot files = no
 
# creates files as writable by group
 
#force create mode = 666
 

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