LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-23-2011, 08:18 AM   #1
ikarian
LQ Newbie
 
Registered: Feb 2011
Posts: 5

Rep: Reputation: 0
Mapping a folder between two virtual installs


Hi everyone-
I am working on a few different Linux related self-education projects, and I'm trying to stump myself as much as possible so I can learn as quickly as possible.

Using VMWare, I have several Linux and Windows flavors I am using for various purposes. To the point, I have an Ubuntu server (text only) and a Fedora desktop installed, and I need to figure out how to map a drive on the Fedora VM so that I can access it on the Ubuntu server VM. I have installed Samba on both, and I can send a ping from one to the other with no problems. I guess I just need some help with the command line syntax?

On a related note, I have NOT been able to figure out how DNS works in a setup like this, so when I say I can ping them, it is by IP address only. I'll work on the DNS stuff soon, but for right now, I just need access to my Fedora VM, unless for some reason you can ONLY set this up via DNS. Can you help me? Thanks!

Ubuntu server 192.168.28.133
Fedora desktop - 192.168.28.130
Folder I need to access: [Fedora desktop]/home/[username]/downloads/
 
Old 02-23-2011, 01:11 PM   #2
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
I recommend you find a book on Samba which will bring you up to speed. One very good book would be by Bruce Perens. According to this site you can download it for free if you become a member.

If you just need a couple of files from the Fedora box you might take a look at using scp assuming that you can ssh between the two. For example if you wanted to get file1.txt you could use the following command:

Code:
scp username@192.168.28.130:downloads/file1.txt .
This command would copy the file1.txt file from the fedora box to the current directory (the period represents the current directory) on the ubuntu box.

You can find out more about ssh and scp by reading their respective manual pages. Just enter at the command prompt:

man scp

or

man ssh

Regards,

Fordeck

Last edited by fordeck; 02-23-2011 at 01:12 PM.
 
Old 02-23-2011, 01:35 PM   #3
ikarian
LQ Newbie
 
Registered: Feb 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Not a bad idea about the book. I will look into it.

As for the scp command, I got a 'no route to host' error. What (if anything) needs to be done to make the files/folders available on the Fedora box? (in parlance of an expatriating Windows admin, one must share the folder before it will be accessible)
 
Old 02-23-2011, 02:13 PM   #4
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Samba could be made to do what you are asking, however the details are in the book. Or perhaps take a look at Samba documentation on their web site.

Quote:
and I can send a ping from one to the other with no problems
That should mean you could connect. May check to see if sshd is running for example:

Code:
$ ps -ef | grep ssh
root      2431     1  0 Feb20 ?        00:00:00 /usr/sbin/sshd
Also you can check with netstat for example:

Code:
$ netstat -nat
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State      
tcp        0      0 :::22                       :::*                        LISTEN
The above example shows a listening port 22 which is the ssh port. If either of the above examples fail to show that your machine is running sshd then you can start sshd using the following command:

Code:
service sshd start
To set it to start at boot time:

Code:
chkconfig sshd on
Anyway once you are able to ping each machine and have sshd running then you should be able to use scp to copy files from one machine to the other. I would try to explain samba, however the samba documentation or the book does a much better job of explaining it. Especially the book by Bruce Perens. It actually has examples that would be similar to what you are trying to accomplish.

Regards,

Fordeck
 
Old 02-23-2011, 11:57 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Samba is really designed to talk to MS systems (the CIFS protocol was created by MS). You can use it to share between 2 *nix systems, but usually you'd use NFS instead. Your choice.
As above, for just moving a few files back & forth, use scp instead.
 
Old 02-24-2011, 11:35 AM   #6
ikarian
LQ Newbie
 
Registered: Feb 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Aaargghh...

So, I had to install OpenSSH on the Ubuntu server (recipient). I now see LISTEN state active in netstat for port 22 (where there was previously nothing listed when I entered the netstat -nat command). Same thing in the Fedora box (the one with the files I need). Still pinging back and forth like a champ. Far as I can tell, SSH is on and working. But still 'no route to host'. Any other ideas? Should I be taking that literally to mean I need to add a static route to the Ubuntu server, even though it can already find it via ping? Thanks again for your help.
 
  


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
Postfix virtual alias for second domain not mapping correctly gr33d Linux - Software 4 06-29-2010 09:20 AM
Mapping linux folder to windows drive Linux Fan Linux - Networking 2 02-04-2010 08:42 AM
unable to auto mount 'shared folder' iin Suse 11.2 virtual machine using Virtual Box marvinudy Linux - Virtualization and Cloud 1 02-03-2010 02:29 PM
Linux virtual table mapping mvniekerk Linux - Embedded & Single-board computer 1 08-14-2008 02:46 AM
Virtual Box. Removing a shared folder inside virtual xp. glore2002 Linux - Software 2 05-20-2007 11:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:29 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