Diff for /wikisrc/tutorials/how_to_set_up_a_samba_server.mdwn between versions 1.1 and 1.2

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

Removed from v.1.1  
changed lines
  Added in v.1.2


CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb