openbsd-ports/net/samba/stable/files
sturm 395bb3aa39 no need to install smb.conf by hand
from rich cannings <rich at cannings dot org>
2004-01-04 08:19:44 +00:00
..
README.OpenBSD no need to install smb.conf by hand 2004-01-04 08:19:44 +00:00

Using samba package in OpenBSD environment:

1. Edit /etc/samba/smb.conf to suit your needs.

2. Edit /etc/rc.conf.local:
   ...
   smbd_flags="-D"         # for normal use: "-D"
   nmbd_flags="-D"         # for normal use: "-D"
   ...

3. Edit /etc/rc.local:
   echo -n 'starting local daemons:'
   ...
   if [ -f /etc/samba/smb.conf ]; then
       if [ X"${smbd_flags}" != X"NO" -a -x /usr/local/libexec/smbd ]; then
           echo -n ' smbd';    /usr/local/libexec/smbd ${smbd_flags}
       fi
       if [ X"${nmbd_flags}" != X"NO" -a -x /usr/local/libexec/nmbd ]; then
           echo -n ' nmbd';    /usr/local/libexec/nmbd ${nmbd_flags}
       fi
   fi
   ...
   echo '.'

Steps 4 and 5 are only necessary if you want to enable swat (Samba 
Web Administration Tool). Please note that administering the server
with swat over a network is inadvisable as passwords are passed in
the clear. You can avoid this problem by using ssh forwarding to
port 901.

4. add the following entry to /etc/inetd.conf:

   ...
   swat  stream  tcp  nowait.400  root  /usr/local/libexec/swat  swat
   ...

5. add the following entry to /etc/services:

   ...
   swat            901/tcp                 # samba admin service
   ...

See documentation files in /usr/local/share/doc/samba and example config
files in /usr/local/share/examples/samba for more information.