Recipe 13.7. Copying Files to a Samba Share

 < Day Day Up > 

13.7.1 Problem

You would like to copy files from a Linux PC to a Windows PC on your LAN using Knoppix.

13.7.2 Solution

You need to have Samba (Chapter 23) already configured and working on your LAN. Open a root shell:

knoppix@ttyp0[knoppix]$ su root@ttyp0[knoppix]#

Create a local directory on which to mount the remote share, then mount the remote share:

root@ttyp0[knoppix]# mkdir /mnt/samba root@ttyp0[knoppix]# mount -t smbfs -o \ uid=knoppix,workgroup=local,username=helix,password=tehsecuar \  //windbag/lan_share/mnt/samba

Substitute your own workgroup, username, password, hostname, and shared folder name. On Windows 95/98/ME, if you did not configure file sharing to require a password, use "guest" as the username and leave the password field blank.

Now you can open a couple of Konqueror windows for copying files or you can use the cp command:

root@ttyp0[knoppix]# cp -av /home/helix  /mnt/samba

13.7.3 Discussion

If you prefer a graphical interface, there are a couple of options. If you know the hostname and share name, enter them in Konqueror's Location bar:

smb://HOST/SHARE

Knoppix also includes LinNeighborhood for network browsing, under Internet LinNeighborhood.

13.7.4 See Also

  • Chapter 9 of Using Samba, by Jay Ts, Robert Eckstein, and David Collier-Brown (O'Reilly)

  • The Official Samba-3 Howto and Reference Guide for Samba 3.x (http://samba.org/)

  • Chapter 23

     < Day Day Up > 


    Linux Cookbook
    Linux Cookbook
    ISBN: 0596006403
    EAN: 2147483647
    Year: 2004
    Pages: 434

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net