[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How to mount a windows shared folder (host OS) from Linux (guest OS) in VMWare

Posted on 2004-10-20
8
Medium Priority
?
1,571 Views
Last Modified: 2012-08-14
I am trying to mount shared folder from Windows on Linux. I am using VMWare to run RedHat 9 as guest. I am trying to mount a windows shared folder from Linux. Here is the command I am using.

mount -t smbfs -o username="xxx/yyy",passwd=zzz //172.192.1.1/e$ /mnt/local

The command barfs. Any pointers as to where I could be going wrong?

Kind regards
0
Comment
Question by:samble
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 4

Expert Comment

by:EinarTh
ID: 12360331
You'll have to 'escape' the '$' sign, i.e. use quotes or a backslash, e.g. :
mount -t smbfs -o username="xxx/yyy",passwd=zzz "//172.192.1.1/e$" /mnt/local

cheers
0
 
LVL 2

Expert Comment

by:ITG-SSNA
ID: 12360526
There is a better way. Take a look at SMBmount :

[root@la-irvine3-ext admin]# which smbmount
/usr/bin/smbmount

I don't have the man page, but it is a lot easier to use.

Can you post the error *barf* ?

Thanks

~K Black
Irvine, Ca.
0
 
LVL 3

Expert Comment

by:255x4
ID: 12361583
smbmount //{NetBIOS name}/{share name} /mnt/local -o username=xxx/yyy passwd=zzz

This should work for you.  Note, I do not know if the system would like a / in the username field, so I hope that is just an indicator to show different passwords.  Remember, you have to use the NetBIOS name and not the IP address of the machine.

If you want to "browse" a machine to see what it has, just use:

smbclient -L {NetBIOS name}

When you get the password prompt, just hitting enter will show you the normal list, except for password protected shares.  If you enter the correct password, it will show you the normal list, with the password protected shares that use that password.

Thanks,

255x4
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 

Author Comment

by:samble
ID: 12365927
I figured it out.

The syntax is:

mount -t smbfs -o username=yyy,workgroup=xxx //{NETBios name}/{share name} /mnt/local

Then you will be prompted for the password (You can also specify the password on the command line itself). You have to specify the "workgroup" option.

Thanks for trying to help me out guys.

Kind regards
0
 
LVL 2

Expert Comment

by:ITG-SSNA
ID: 12372035
Warning!!! What you are doing is NOT advised! If the remote system hangs it WILL hang BOTH. Please check out smbmount which is MUCH safer than mount in this case.
0
 
LVL 3

Expert Comment

by:255x4
ID: 12372957
If the remote computer hangs while using smbmount, you simply log in as root, and give

smbumount /mnt/local

because issuing it as user causes problems.  If you use mount directly, you are either running as root, or mount is running as SU root, which makes it a root-level command, and no one can kill it if the remote machine either hangs or is rebooted.

Thanks ITG-SSNA for pointing that out.

255x4
0
 
LVL 1

Accepted Solution

by:
DarthMod earned 0 total points
ID: 16143328
PAQed with points (125) refunded

DarthMod
Community Support Moderator
0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month12 days, 21 hours left to enroll

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question