Setting up a samba server on your NetBSD box for WindowsXP clients is really simple.
Install samba via pkgsrc:
# cd /usr/pkgsrc/net/samba
# make install clean
Start the services via /etc/inetd.conf then uncomment the next two lines.
#netbios-ssn stream tcp nowait root /usr/pkg/sbin/smbd
#netbios-ns dgram udp wait root /usr/pkg/sbin/nmbd
Change it to this:
netbios-ssn stream tcp nowait root /usr/pkg/sbin/smbd
netbios-ns dgram udp wait root /usr/pkg/sbin/nmbd
Save the changes and restart inetd:
/etc/rc.d/inetd restart
Now add the following lines to /etc/rc.conf:
smbd=YES
nmbd=YES
samba=YES
You have to create a /usr/pkg/etc/samba/smb.conf with the following basic configuration:
workgroup="some_group"
server string="NetBSD Samba Server"
hosts allow = 192.168.1. , 192.168.0.
encrypt passwords = yes
[shared]
comment = Shared
path = /home/ficovh/mp3
browseable = yes
writable = no
valid users = samba
Add a valid user to the NetBSD system:
# useradd samba
Add a windows user to samba and set the password:
# smbpasswd -a -U samba
Now test the server with your Windows machine.
You can also browse the content from a windows machine with NetBSD smbclient:
# smbclient //ip_windows/shared_name_resource
ip_windows is the IP for the windows machine and shared_name_resource is the directory shared.
You can also test if your local samba server is working.
# smbclient -Usamba -L localhost
Thats it, a basic samba server on your NetBSD box.