openbsd-ports/net/samba/files
ajacoutot 186fa1fd56 - don't use $SYSCONFDIR for base system files (which are always
installed under /etc, whatever $SYSCONFDIR value is)
- s/PREFIX/LOCALBASE and the opposite where it makes sense
- README.OpenBSD is part of samba-docs, so no need to tell the user to
install samba-docs

ok mbalmer@ who gave me ten bonus points for solving the samba puzzle!
2008-08-30 17:02:26 +00:00
..
krb5-config add support for talking to active directory with an ads flavor. 2008-03-18 09:15:50 +00:00
README.OpenBSD - don't use $SYSCONFDIR for base system files (which are always 2008-08-30 17:02:26 +00:00

Using samba package in an OpenBSD environment:

1. Edit ${SYSCONFDIR}/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 ${SYSCONFDIR}/samba/smb.conf ]; then
       if [ X"${smbd_flags}" != X"NO" -a -x ${LOCALBASE}/libexec/smbd ]; then
           echo -n ' smbd';    ${LOCALBASE}/libexec/smbd ${smbd_flags}
       fi
       if [ X"${nmbd_flags}" != X"NO" -a -x ${LOCALBASE}/libexec/nmbd ]; then
           echo -n ' nmbd';    ${LOCALBASE}/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  ${LOCALBASE}/libexec/swat  swat
   ...

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

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

See documentation files in
${PREFIX}/share/doc/samba and example config files in
${PREFIX}/share/examples/samba for more information.