Solved

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

Posted on 2004-10-20
8
1,531 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
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

773 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