Diff for /wikisrc/tutorials/how_to_set_up_a_samba_server_using_swat.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
 [![SWAT's main menu][3]][4]  [![SWAT's main menu][3]][4]
   
    [3]: /images/400px-SWAT.jpg     [3]: /images/400px-SWAT.jpg
    [4]: /images/SWAT.jpg (SWAT's main menu)     [4]: /images/SWAT.jpg (SWAT's main menu)
   
 [![][5]][6]  [![][5]][6]
   
    [5]: /images/magnify-clip.png     [5]: /images/magnify-clip.png
    [6]: /images/SWAT.jpg (Enlarge)     [6]: /images/SWAT.jpg (Enlarge)
   
 SWAT's main menu  SWAT's main menu
   
 ##  Introduction  ##  Introduction 
   
 SWAT - the Samba Web Administration Tool provides a really quick and easy way to set up a Samba server, with more powerful configuration options available to those who need them. It's already part of the Samba package that is available from pkgsrc, and you don't even need to install and configure an HTTP server like Apache to use it.  SWAT - the Samba Web Administration Tool provides a really quick and easy way to set up a Samba server, with more powerful configuration options available to those who need them. It's already part of the Samba package that is available from pkgsrc, and you don't even need to install and configure an HTTP server like Apache to use it. 
   
 In this tutorial I will go through the steps I took to set up a share on my NetBSD machine, so that the machine's hard drive could be used for storage by the Windows PC's on the network. The 'guest' account is used for access and I won't go into how to set up users and passwords, so this solution would probably be more suitable for home networks.  In this tutorial I will go through the steps I took to set up a share on my NetBSD machine, so that the machine's hard drive could be used for storage by the Windows PC's on the network. The 'guest' account is used for access and I won't go into how to set up users and passwords, so this solution would probably be more suitable for home networks. 
   
 ##  Install Samba and enable SWAT  ##  Install Samba and enable SWAT 
   
 The first step is to fetch, build and install Samba:  The first step is to fetch, build and install Samba: 
          
      # cd /usr/pkgsrc/net/samba       # cd /usr/pkgsrc/net/samba
      # make install clean       # make install clean
          
   
 Next, put scripts in /etc/rc.d so that smbd and nmbd will be started automatically when NetBSD boots up. I simply used the example scripts that came with NetBSD.  Next, put scripts in /etc/rc.d so that smbd and nmbd will be started automatically when NetBSD boots up. I simply used the example scripts that came with NetBSD. 
          
      # cp /usr/pkg/share/examples/rc.d/smbd /etc/rc.d/       # cp /usr/pkg/share/examples/rc.d/smbd /etc/rc.d/
      # cp /usr/pkg/share/examples/rc.d/nmbd /etc/rc.d/       # cp /usr/pkg/share/examples/rc.d/nmbd /etc/rc.d/
          
   
 You also need to add the following lines to /etc/rc.conf  You also need to add the following lines to /etc/rc.conf 
          
      smbd=YES       smbd=YES
      nmbd=YES       nmbd=YES
          
   
 SWAT can be enabled by adding the following line to /etc/inetd.conf  SWAT can be enabled by adding the following line to /etc/inetd.conf 
          
      swat stream tcp nowait.400 root /usr/pkg/sbin/swat swat       swat stream tcp nowait.400 root /usr/pkg/sbin/swat swat
          
   
 Now, restart inetd to enable SWAT  Now, restart inetd to enable SWAT 
          
      # /etc/rc.d/inetd restart       # /etc/rc.d/inetd restart
          
   
 ##  Use SWAT to configure the Samba server  ##  Use SWAT to configure the Samba server 
   
 You should now be able to access SWAT by surfing to **http://<netbsdmachine>:901/** where **<netbsdmachine>** is the IP for your NetBSD machine (or localhost if you are accessing SWAT locally). Login as 'root' with your system's root password. You will be taken to SWAT's main menu.  You should now be able to access SWAT by surfing to **http://<netbsdmachine>:901/** where **<netbsdmachine>** is the IP for your NetBSD machine (or localhost if you are accessing SWAT locally). Login as 'root' with your system's root password. You will be taken to SWAT's main menu. 
   
 First, click on the '**Globals'** icon, and use that menu to configure global options such as the 'workgroup' your Samba server is to be part of. If you don't understand what an option does, click the 'help' link next to it. Use the 'commit changes' button to save your work.  First, click on the '**Globals'** icon, and use that menu to configure global options such as the 'workgroup' your Samba server is to be part of. If you don't understand what an option does, click the 'help' link next to it. Use the 'commit changes' button to save your work. 
   
 Next, click on the '**Shares'** icon. To create a share, type a name into the text box and click 'create share'. You will now be able to specify the path to the folder that you want to share. To make the share accessible to anyone on the network without a password, change 'guest ok' to 'yes' using the drop-down menu. Change 'read only' to 'no' if you want other machines on the network to have read/write access to your shared folder.  Next, click on the '**Shares'** icon. To create a share, type a name into the text box and click 'create share'. You will now be able to specify the path to the folder that you want to share. To make the share accessible to anyone on the network without a password, change 'guest ok' to 'yes' using the drop-down menu. Change 'read only' to 'no' if you want other machines on the network to have read/write access to your shared folder. 
   
 Finally click on the '**Status'** icon. From here you can start/stop/restart the Samba server without having to issue any commands at the command line. Just click 'start smbd' and 'start nmbd'.  Finally click on the '**Status'** icon. From here you can start/stop/restart the Samba server without having to issue any commands at the command line. Just click 'start smbd' and 'start nmbd'. 
   
 Your shared folder should now be accessible by the other machines on the network...To check this out, use 'Network Neighbourhood' in Windows or KDE users can surf to smb:/ in Konqueror...  Your shared folder should now be accessible by the other machines on the network...To check this out, use 'Network Neighbourhood' in Windows or KDE users can surf to smb:/ in Konqueror... 

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


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