![]()
Samba is a file and print server for Windows-based clients using TCP/IP as the underlying transport protocol. In fact, it can support any SMB/CIFS-enabled client. One of Samba’s big strengths is that you can use it to blend your mix of Windows and Unix machines together without requiring a separate Windows NT/2000/2003 Server.
On OpenBSD, the Samba configuration file is /etc/samba/smb.conf. There are some changes we want to make to the original file. Assume we want to run Samba for machines located on our LAN, 192.168.0.0./24 and this machine has the IP address 192.168.0.1.
hosts allow = 192.168.0.0./24 127.0.0.1 interfaces = 192.168.0.1 socket options = TCP_NODELAY encrypt passwords = yes
Now we have to add a directory we want to share. Assume we have a directory /data that we want to make public and writeable to everyone who can login to Samba.
[data]
comment = Data
path = /data
read only = no
public = yes
Now we have to set the password for a user to be able to login to Samba.
/usr/local/bin/smbpasswd username