Basic filesharing server on OpenBSD (updated for 6.0)
Install samba:
pkg_add sambaCreate a folder to use as a shared location. According to the official docs, that's what /srv is for. Since I use this a lot, I'm not going to bother with any further file structure.
mkdir -p /srv/Modify the samba configuration file for a basic all-permissive shared folder. My threat model assumes that if someone is connected to the network, they're friendly. Since there's several Win7 computers on the network, I had to get around the authentication requests.
chmod 777 /srv/
Cut & paste stuff doesn't really work on the command line, so here's what needs to be added at the bottom of the /etc/samba/smb.conf. src.
nano /etc/samba/smb.conf
[SRV]After finishing the smb.conf edits, use the rc.conf.local file to start the samba share with the machine. You can use the echo command to make the adjustments. Note: rc.conf.local doesn't actually exist in the default OpenBSD...but it is acknowledged. src.
path = /srv/
public = yes
only guest = yes
writable = yes
printable = no
guest ok = yes
read only = no
map to guest = bad user
echo '
smbd_flags="-D"
nmbd_flags="-D"
' >> /etc/rc.conf.local
rcctl enable sambaThat should do it.
rcctl restart samba