Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Samba HowTo Guide
Prev Home Next

Multiple Virtual Server Hosting

In this example, the requirement is for a primary domain controller for the domain called MIDEARTH. The PDC will be called MERLIN. An extra machine called SAURON is required. Each machine will have only its own shares. Both machines belong to the same domain/workgroup.

The master smb.conf file is shown in the Master smb.conf File Global Section. The two files that specify the share information for each server are shown in the smb-merlin.conf File Share Section, and the smb-sauron.conf File Share Section. All three files are locate in the /etc/samba directory.

Example33.3.Master smb.conf File Global Section

# Global parameters
[global]
workgroup = MIDEARTH
netbios name = MERLIN
netbios aliases = SAURON
passdb backend = tdbsam
smb ports = 139
syslog = 0
printcap name = CUPS
show add printer wizard = No
add user script = /usr/sbin/useradd -m '%u'
delete user script = /usr/sbin/userdel -r '%u'
add group script = /usr/sbin/groupadd '%g'
delete group script = /usr/sbin/groupdel '%g'
add user to group script = /usr/sbin/usermod -G '%g' '%u'
add machine script = /usr/sbin/useradd -s /bin/false -d /var/lib/nobody '%u'
logon script = scripts\login.bat
logon path =
logon drive = X:
domain logons = Yes
preferred master = Yes
wins support = Yes
printing = CUPS
include = /etc/samba/smb-%L.conf

Example33.4.MERLIN smb-merlin.conf File Share Section

# Global parameters
[global]
workgroup = MIDEARTH
netbios name = MERLIN
[homes]
comment = Home Directories
valid users = %S
read only = No
browseable = No
[office]
comment = Data
path = /data
read only = No
[netlogon]
comment = NETLOGON
path = /var/lib/samba/netlogon
read only = Yes
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
use client driver = Yes
browseable = No

Example33.5.SAURON smb-sauron.conf File Share Section

# Global parameters
[global]
workgroup = MIDEARTH
netbios name = SAURON
[www]
comment = Web Pages
path = /srv/www/htdocs
read only = No
Samba HowTo Guide
Prev Home Next

 
 
  Published under the terms fo the GNU General Public License Design by Interspire