- The server will only allow access from hosts on the internal network and members of MARYWRKG workgroup.
- Windows user mary does not have an account on the linux Samba server.
- Mary will be able to use mark's linux account, access /share directory and use printing (CUPS).
**Set up Windows computer name to IP mapping - /etc/samba/lmhosts
# Maps windows computer name to its IP
Map Window's user accounts to linux accounts - /etc/samba/smbusers
# Unix_name = SMB_name1 SMB_name2 ...
root = administrator admin
nobody = guest pcguest smbguest
mark = mary # Windows user mary maps to linux user mark
**Configure shares, printing and the Samba server - /etc/samba/smb.conf
# Network Related Options
netbios name = MYSERVER
interfaces = lo eth0 # Which interfaces to listen on.
hosts allow = 127. 192.168.0. # Who can/cannot access, can be done on a per share option.
# Filesystem Options
workgroup = MARYWRKG # Workgroup = NT-Domain-Name or Workgroup-Name
# needs to be enabled for a win client to browse its
# local network, using this server for NetBios.
server string = f86local:samba3 # Server string is the equivalent of the NT Description field.
username map = /etc/samba/smbusers # Mapping of linux user names to windows users - the windows user
# does not have an account of the same name on the linux box.
# Standalone Server Options
os level = 1
preferred master = Yes
security = user # Security can be set to user (share or server deprecated).
passdb backend = tdbsam # either tdbsam or ldapsam. smbpasswd (backwards compatibility)
# tdbsam requires no further configuration.
# Logging Options
log file = /var/log/samba/log.%m # Where to put logs. %m => a log per system/client.
max log size = 50 # Max 50KB per log file, then rotate.
# Name Resolution # Can be a WINS Server, or a WINS Client, but NOT both.
wins support = yes # Tells the NMBD component of Samba to enable it's WINS Server.
; wins server = w.x.y.z # Tells the NMBD components of Samba to be a WINS Client.
; wins proxy = yes # Act as a proxy for non WINS capable clients, there must be
# a WINS server on network.
dns proxy = no # Try or not to resolve NetBios names.
# Printing Options
; load printers = yes # Load list of printers automatically instead of setting
# up individually.
; printing = BSD # Comment out cups and uncomment this to use BSD printing,
printing = cups # Selects a non default printing system.
cups options = raw # Choose cups lib options, 'raw' allows drivers on windows
# clients to be used.
[homes] # Allows users to access their (local) home directories from
comment = Home Directories # remote Samba clients using either their login name or 'homes'
guest ok = no # as the service name.
read only = no
browseable = no
; writable = yes
; valid users = %S
; valid users = MYDOMAIN\%S
comment = All Printers
; printcap name = /etc/printcap # For BSD printing. Can specify an alternative printcap file
; print command = /usr/bin/lpr -r %s # Command to use.
path = /var/spool/samba
browseable = no
public = yes
guest ok = yes
writable = no
printable = yes
printer admin = root
comment = Printer Drivers
path = /etc/samba/drivers
browseable = yes
guest ok = no
read only = yes
write list = root
[myshare] # A shared resource.
comment = samba share
path = /share
valid users = mark
read only = no
Test changes made to smb.conf
# testparm /etc/samba/smb.conf
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Processing section "[myshare]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Run after changes to smb.conf.