Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have centOS 5.5 installed on virtual box it has no GUI so every thing is command based. I want to make a folder in centOS which i can share with my windows 7 host OS such that i can send files to and fro seamlessly. I am new to linux and i managed to install samba. I looked up some tips on net but i ended up getting confused and none of them worked. Can someone explain to me how i can do this in a straight forward way from how i can configure samba to how i can mount the folder such that it can be seen on the host operating system. I am completely lost.please help.

share|improve this question

VirtualBox's shared folders feature will enable you to easily share folders between the host and client without having to install extra software on either one (other than the VBox Guest Additions).

share|improve this answer

First, install samba using yum:

yum install samba

Then specify the samba password for your user:

smbpasswd user_name

Now you have to configure samba:

vi /etc/samba/smb.conf

Go to the end of the file and write this:

   valid users = your_user
   public = no
   path = /your/path/to/share
   printable = no
   writable = yes

Save the file, and restart Samba:

restart samba   or   /etc/init.d/samba restart

Now you can go to Windows and create a shortcut to \\ip\shared_folder

share|improve this answer
When i try to set the password i get "Failed to find entry for user" what's going on. Also clarify on what you mean by ip in \\ip\shared_folder. Is it an ip address – Wasswa Samuel Jun 8 '12 at 14:26
if you are using a Linux user called "mike", then you do smbpasswd mike and then in the conf file you write valid users = mike. – Vic Abreu Jun 8 '12 at 14:30
If you centOS machine has the ip then, from Windows you have to create a shortcut to \\\shared_folder – Vic Abreu Jun 8 '12 at 14:31
How do you check the ip address for the virtual machine. – Wasswa Samuel Jun 10 '12 at 19:15
In Linux you can use ifconfig con Command line fot viewing ip information. Anyway you have to be sure that your Virtual Machine is getting ip maybe with Bridge connection, go to the Virtual Machine Network configuration in Virtual Box configuration. – Vic Abreu Jun 11 '12 at 13:11

If you're getting a "Failed to find entry for user" you can add users via smbpasswd -a <username>.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .