samba-logo.png

When configuring a Samba server, remember that the discovery of machines on the network happens not only with DNS but also with a few other mechanisms. I recently setup a number of virtual machines for developers, that were created by cloning a single instance.

Mistakenly, I thought that adding a DNS config entry for each virtual machine on the host's /etc/hosts would be enough, but it's not. What we found was that everyone was connecting to the same VM (another requirement was that they be on the same subnet).

Since I don't have access to the network's DHCP server, the key is to change each Samba server's NetBios name to be unique.

A dump of useful settings:

security = user
netbios name = centosvm-mark
[webroot]
comment = The Apache webroot
path = /var/www/html
browseable = yes
read only = no
create mask = 664
directory mask = 775

Add user:

  smbpasswd -a username

List users:

  sudo pdbedit -w -L

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options