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've been setting up a dev machine over the last week and I want to be able to network the drive on my host Windows Server machine, using hyper v, to my guest Ubuntu Server machine.

Server address is \\SRV

File share is \\SRV\public_html and is accessed on my guest Windows XP machine for shared verification.

Any links or suggestions would be awesome on how to do this from the terminal.

Update:

I used this to install samba http://www.howtogeek.com/howto/ubuntu/install-samba-server-on-ubuntu/ and, I created the cedentials file manually using sudo touch credentials as suggested by answer below

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Edit /etc/fstab, add an entry like:

# Samba
//server/share  /media/samba  cifs  credentials=/etc/samba/credentials,uid=1000,gid=100  0  0

Where: "Server" = Samba server (by IP or name if you have an entry for the server in your hosts file

"share" = name of the shared directory

In the credentials file put two lines

username=user 
password=password

Make the file owned by root and ro by root (sudo chown root.root /etc/samba/credentials && sudo chmod 400 /etc/samba/credentials)

share|improve this answer
    
I do not have a samba dir do I need to apt-get something? –  Thorn007 Nov 3 '10 at 17:54
    
I have only installed the core components. –  Thorn007 Nov 3 '10 at 18:03
2  
You need to install samba to access to windows shares from Linux. –  João Pinto Nov 3 '10 at 18:13

About Hyper V I can't help you because never used it. The networking setup is Hyper-V specific, if possible you should set it up using NAT.

To access the shared drive from Ubuntu: From the top panel. Places -> Connect to Server -> Select Windows share and provide the required info.

share|improve this answer
    
Any idea how to do this from Ubuntu server terminal? –  Thorn007 Nov 3 '10 at 17:19

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.