Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to setup a samba server on My Ubuntu host for My Windows Guest in Virtual Box.

The Question is : How can I achieve this or Is it possible?

Note:

I am not trying to use the shared folder feature of Virtual Box. I used that feature already. Please Remember that I have only a physical machine. The other one is virtual.

share|improve this question
add comment

2 Answers 2

I think, you just want to have a common folder where both the os can share their data.
To do this, you would need to install samba server on your Ubuntu host. Find more info here - https://help.ubuntu.com/community/Samba/SambaServerGuide#Ubuntu_Server (read only the ubuntu section. Its very easy.) Once you have done that and you have some folders to share, make sure that both machines can find each other on the lan (see this question - Connecting 2 ubuntu machines as a LAN).
Finally, go to 'my computer' on your windows host and map a network drive ( http://compnetworking.about.com/od/windowsxpnetworking/ht/mapnetworkdrive.htm ), which will be the one of your ubuntu host.

Now you can share data between both your machines.

share|improve this answer
    
I have only a physical machine, the other one is virtual. Will this works also? –  Anwar Shah Jun 16 '12 at 16:52
    
yes, provided that you have properly configured your virtual box to allow connectivity between the 2 of them –  Guanidene Jun 16 '12 at 17:26
    
What was that proper configuration. There was Five different methods for networking, "Bridged", "Host-Only" and some others. What I need to select. –  Anwar Shah Jun 16 '12 at 17:31
add comment

Are you just trying to share files with the Windows guest? Have you configured Virtualbox for sharing the directories, in "Devices => Shared Folders?" That is necessary for the guest to see the shared directories, although there may be other ways to set up the network. Then, if it doesn't work, you may need to install Samba on Ubuntu - I'm not sure if it's installed by default or not.

For more information on configuring the samba server on the host, you can take a look at this article. Usually, all you need to do is edit /etc/samba/smb.conf to add the name of the computer and the network, which defaults to "Workgroup", but should match the name of the windows network. These two lines in [global] are the ones that set it:

   workgroup = workgroup-name
   netbios name = server-name
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.