Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-23-2003, 08:50 PM
|
#1
|
LQ Newbie
Registered: Mar 2003
Location: Blue Springs, Missouri
Posts: 7
Rep:
|
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.
|
|
|
06-23-2003, 09:03 PM
|
#2
|
LQ Newbie
Registered: Jun 2003
Posts: 10
Rep:
|
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??
|
|
|
06-23-2003, 09:30 PM
|
#3
|
Member
Registered: Feb 2002
Location: Mission Viejo, California, USA
Distribution: Gentoo
Posts: 707
Rep:
|
Quote:
get <remote file name> [local file name]
|
|
|
|
06-23-2003, 09:34 PM
|
#4
|
LQ Newbie
Registered: Mar 2003
Location: Blue Springs, Missouri
Posts: 7
Original Poster
Rep:
|
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.
|
|
|
06-23-2003, 10:15 PM
|
#5
|
Member
Registered: Feb 2002
Location: Mission Viejo, California, USA
Distribution: Gentoo
Posts: 707
Rep:
|
You can also mount samba shares like nfs shares.
|
|
|
06-24-2003, 07:16 AM
|
#6
|
LQ Newbie
Registered: Mar 2003
Location: Blue Springs, Missouri
Posts: 7
Original Poster
Rep:
|
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.
|
|
|
06-24-2003, 11:07 AM
|
#7
|
Member
Registered: Feb 2002
Location: Mission Viejo, California, USA
Distribution: Gentoo
Posts: 707
Rep:
|
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.
|
|
|
06-24-2003, 11:11 AM
|
#8
|
LQ Newbie
Registered: Mar 2003
Location: Blue Springs, Missouri
Posts: 7
Original Poster
Rep:
|
Thanks, I am learning. I appreciate your comments.
|
|
|
06-24-2003, 11:26 AM
|
#9
|
Member
Registered: Jun 2003
Location: Europe, Latvia
Distribution: Slackware
Posts: 44
Rep:
|
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
|
|
|
06-24-2003, 12:07 PM
|
#10
|
Member
Registered: Feb 2002
Location: Mission Viejo, California, USA
Distribution: Gentoo
Posts: 707
Rep:
|
Or you can mount it with all the other filesystems in /etc/fstab
|
|
|
All times are GMT -5. The time now is 07:47 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|