tonywhitmore.co.uk  

      blog : gallery : wiki : articles : projects : shell scripts : wallpaper : cv : links :
 Project Homepage

Samba 3.0.2
Samba

Preparation

  1. Download the Samba source code from www.samba.org.
  2. Burn the file samba-latest.tar.gz to a CD. This page assumes that the subdirectory /apps is used for the .tar.gz file. The CD-ROM can be a multi-session disk.

Give me more details on this

Booting

  1. Boot your Core Linux PC.
  2. Login as root. You will need to enter the password at the prompt.

Give me more details on this

Extract the source

  1. Place the CD-R in the CD-ROM drive. Mount the CD-ROM drive under /mnt/cdrom.
  2. Change to the /apps directory on the CD-R.
  3. Copy the samba-latest.tar.gz file to the directory /usr/src.
  4. Change to the /usr/src directory and extract the source from the .tar.gz file.

Give me more details on this

Configure and compile Samba

  1. The .tar.gz file will have been decompressed to a directory called samba-x.x.x where x.x.x is the version number of the Samba source code. The version detailed here is Samba 3.0.2a. Change to the /usr/src/samba-3.0.2a/source directory.
  2. Run the ./configure script.
  3. Run the make program.
  4. Run the make program with the argument install.

Give me more details on this

Setting up Samba

  1. Change to the /usr/local/samba/lib directory.
  2. Edit the smb.conf file.
  3. Enter the text below as a basic Samba configuration. You may replace the value of the variable workgroup with your own workgroup name.
    [global]
       workgroup = SIMPLE
       netbios name = Core
       security = share
       guest ok = yes
       guest account = samba

    [test]
       path = /home/samba/test
       read only = no
  4. Save the file and exit the text editor.
  5. Create the directory /home/samba/test.
  6. Change the access permissions of the /home/samba/test directory to 0777. Although this is an insecure state to leave a folder, this is only for the purposes of testing.
  7. Test the syntax of your smb.conf file using the testparm tool.
  8. Add the user samba.

Give me more details on this

Starting Samba

  1. Start the smbd and nmbd daemons with the argument -D.

Give me more details on this

Testing Samba

  1. At the prompt enter:
    /usr/local/samba/bin/smbclient -L Core
  2. The screen will display the following message:
    Password:
  3. At the prompt, enter your root password.
  4. The system will display the following message:
    Domain=[SIMPLE] OS=[Unix] Server=[Samba 3.0.2a]

         Sharename      Type     Comment
         ---------      ----     -------
         test           Disk
         IPC$           IPC      IPC Service (Samba 3.0.2a)
         ADMIN$         Disk     IPC Service (Samba 3.0.2a)

         Server             Comment
         ----------         -------
         CORE               Samba 3.0.2a

         Workgroup          Master
         ---------          -------
         SIMPLE             CORE
    There may be other machines listed under the Server section if you have other computers running SMB servers in the same workgroup as your Core Linux PC. Also, the master browser may be different from that listed in the Master section.
  5. Assuming you saw no error messages you have correctly installed and configured Samba. Try to access the Samba server using smbclient or another SMB application on your other PC.

Give me more details on this

Stopping Samba

  1. Stop the Samba servers using kill and remove the PID files.

Give me more details on this

Automating Samba

  1. Append the following lines to the /etc/rc.d/rc.mu script:
    /usr/local/samba/sbin/smbd -D
    /usr/local/samba/sbin/nmbd -D
    You can also add comments and echoes for your own information.
  2. Insert the following lines at the second line of the /etc/rc.d/rc.ha script:
    kill `cat /usr/local/samba/var/locks/smbd.pid`
    rm -f /usr/local/samba/var/locks/smbd.pid
    kill `cat /usr/local/samba/var/locks/nmbd.pid`
    rm -f /usr/local/samba/var/locks/nmbd.pid
    You can also add comments and echoes for your own information.
  3. Reboot the system and check that Samba is running.

Give me more details on this

Creative Commons License
The text of this page is licensed under a Creative Commons License.


Valid CSS!     Valid HTML 4.0!     Valid RSS
Original design © For oswd.org by SquireCD