Configuring a samba server

install samba via yum etc.

Create the smb.conf config file in /usr/local/samba/lib/smb.conf

Basic smb.conf sample:

[global]
workgroup = DEVELOPMENT
encrypt passwords = yes

[homes]
guest ok = no
read only = no
browseable = no

[share]
path = /mnt/shareddrive
browseable = yes
read only = no

Always test your config with testparm after any changes:

root@somebox:/usr/local/samba# bin/testparm lib/smb.conf
Load smb config files from lib/smb.conf
Processing section “[homes]”
Processing section “[share]”
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
workgroup = DEVELOPMENT

[homes]
read only = No
browseable = No

[share]
path = /mnt/shareddrive
read only = No

Start Samba by running /etc/init.d/smb/start

You may have to change the firewall to allow connections on TCP port 445. For
older stuff, you may also need to allow 137-139 TCP and UDP.

Adding users

As root, run: /usr/local/samba/bin/smbpasswd -a username :

root@mybox:/usr/local/samba# bin/smbpasswd -a dave
New SMB password:
Retype new SMB password:
Added user dave.

You can leave a response, or trackback from your own site.

Leave a Reply