LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-23-2003, 08:50 PM   #1
coppersky
LQ Newbie
 
Registered: Mar 2003
Location: Blue Springs, Missouri
Posts: 7

Rep: Reputation: 0
Using SMB to copy files from one linux machine to second linux machine.


This is a newbie question from somebody who has just added a second linux machine to his network.

This is the situation. I have a tiny home network -- 4 machines. I have two windows machines and two linux machines. I have samba up and running on one linux machine. I can access my samba server from my redhat machine using smbclient. I want to copy a file from my samba server to my redhat machine. How?

Thanks.

Sorry, you just use the get command. Very interesting.

Last edited by coppersky; 06-23-2003 at 09:02 PM.
 
Old 06-23-2003, 09:03 PM   #2
delic
LQ Newbie
 
Registered: Jun 2003
Posts: 10

Rep: Reputation: 0
well you can use samba but i personally found a sweet little command a while ago.. scp (secure copy) You can copy a file from one machine to another with a simple command like this

scp copiedfile remotecomputerip_or_hostname:/path/for/file

so if you want to copy /etc/hosts.allow from one computer to the /home/user directory on the host linuxbox2

scp /etc/hosts.allow linuxbox2:/home/user

it's real handy... You may or may not be interested??
 
Old 06-23-2003, 09:30 PM   #3
zmedico
Member
 
Registered: Feb 2002
Location: Mission Viejo, California, USA
Distribution: Gentoo
Posts: 707

Rep: Reputation: 30
Quote:
get <remote file name> [local file name]
Code:
man smbclient
 
Old 06-23-2003, 09:34 PM   #4
coppersky
LQ Newbie
 
Registered: Mar 2003
Location: Blue Springs, Missouri
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks guys. I appreciate the replies.

I will try the secure copy "scp" command later.

I was a little confused because I was reading a howto someplace and they said to use the cp command. Obviously, it doesn't work.

I have a bad habit of anwering my own questions. Sorry.

Last edited by coppersky; 06-23-2003 at 09:37 PM.
 
Old 06-23-2003, 10:15 PM   #5
zmedico
Member
 
Registered: Feb 2002
Location: Mission Viejo, California, USA
Distribution: Gentoo
Posts: 707

Rep: Reputation: 30
You can also mount samba shares like nfs shares.
Code:
man smbmount
 
Old 06-24-2003, 07:16 AM   #6
coppersky
LQ Newbie
 
Registered: Mar 2003
Location: Blue Springs, Missouri
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks. Mounting requires you to sign on as root, and the syntax seems a little clunky.

Using smbclient is almost like using FTP.

Thanks again.
 
Old 06-24-2003, 11:07 AM   #7
zmedico
Member
 
Registered: Feb 2002
Location: Mission Viejo, California, USA
Distribution: Gentoo
Posts: 707

Rep: Reputation: 30
Whichever you prefer, but a user can mount an smbfs on a directory that they own. All you have to do is "chmod u+s /usr/bin/smbmnt" (as root). An entry in /etc/fstab can make the syntax more manageable.

Last edited by zmedico; 06-24-2003 at 11:10 AM.
 
Old 06-24-2003, 11:11 AM   #8
coppersky
LQ Newbie
 
Registered: Mar 2003
Location: Blue Springs, Missouri
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks, I am learning. I appreciate your comments.
 
Old 06-24-2003, 11:26 AM   #9
v3rb0
Member
 
Registered: Jun 2003
Location: Europe, Latvia
Distribution: Slackware
Posts: 44

Rep: Reputation: 15
Quote:
Originally posted by coppersky
Thanks. Mounting requires you to sign on as root, and the syntax seems a little clunky.
.
You can put mount command in init script (e.g. /etc/init.d/local.sh) and then it will mount automacicaly.

mount -t smbfs -o username=user,password=user_password //remote/share /local/mountpoint
and all, nothing clunky
 
Old 06-24-2003, 12:07 PM   #10
zmedico
Member
 
Registered: Feb 2002
Location: Mission Viejo, California, USA
Distribution: Gentoo
Posts: 707

Rep: Reputation: 30
Or you can mount it with all the other filesystems in /etc/fstab
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SCP: Copy file from remote linux server onto a windows machine? Tony Empire Linux - Newbie 21 09-22-2015 10:18 PM
scp: copy a file from local machine to remote machine seran Linux - Newbie 8 10-30-2007 12:23 PM
trying to copy files from another machine to the local machine using telnet,..how? shrike_912 Programming 6 03-14-2006 04:45 PM
copy from windows machine to a linux machine s_deepblue Linux - Networking 3 03-12-2005 01:43 PM
Linux unable to connect to another Linux machine via Samba (SMB) Please help shassouneh Linux - Networking 4 03-11-2002 02:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration