The older way to share folders with the host system is SMBFS. It is inferior compared to CIFS, but it doesn't need a static ip address for the host machine. Regarding stability it may be still better to use SMBFS instead of VMware's Shared Folders. Furthermore Player users must access shares with CIFS or SMBFS, because VMware Player can't enable Shared Folders at all.
Lets assume that a Linux user "userXYZ" wants to connect to a Windows host:
The Windows user "winUsername" is member of workgroup "WORKGROUP" and "shareName" is the name of the shared folder on the host computer named "hostName".
0) Make sure your VMware installation is ok. For instance I had an "unknown (network) device" in my Windows installation resulting from installing and deinstalling different versions of VMware. Take care to reboot after deinstalling or better after installing, too. That was what I probably missed once. The "unknown device" negated all my attempts to get CIFS working. Another showstopper is a deactivated network adapter in your Debian system (check it with Desktop->Administration->Networking)
1) In the Linux guest system install these two packages with Synaptic:
During installation of smbfs you have to answer a question about your workgroup with:
Probably it is best to enter the actual domain/workgroup of the host system here. The function of mounting a share from the host seems to be unaffected, but the entry would matter for the access of a share from the guest.
Then you will be prompted to Modify smb.conf to use WINS settings from DHCP. Just go ahead with the default choice.
2) Contrary to the CIFS example we are creating here a share that is only visible to a specific user. So you have to be logged in as userXYZ for the next two steps. Open a terminal and create a directory where the share shall appear on your Linux filesystem
3) Create a password file /home/userXYZ/smbpw with the login credentials for your Windows account
username=winUsername password=winPassword domain=WORKGROUP
From here on you will have to do everything as root, so close the editor with which you created the file above, open a root terminal and type gedit.
4) Edit /etc/fstab and add a single line for the mount. Here "hostName" is the name of the Windows machine, "shareName" is the name of its shared folder, "userXYZ" is the user name of the Linux system and "folderName" is the folder where the contents of the shared Windows folder appears. Of course you could have chosen to make "folderName" the same as "shareName".
//hostName/shareName /home/userXYZ/folderName smbfs credentials=/home/userXYZ/smbpw,uid=userXYZ,gid=userXYZ,dmask=700,fmask=700 0 0
5) Close the editor. In the root terminal mount all mounts mentioned in fstab
If this command hangs, i.e. you don't see the prompt on the next line appearing again within a few seconds, something went wrong. You should close the terminal window and remove the added line in /etc/fstab because at boot mount -a gets called in the /etc/rc.d/rc.local of the Debian VMware Appliance. See 0) for what could be a possible reason.
If the mount command returns and you can see your shares in the file browser afterwards, then the shares should be mounted automatically at the next boot.
If the mount command quits with an error message you should first check if the shares show up in the file browser nonetheless. Otherwise it may help to execute step 1) and 2) of the CIFS set up. Alternatively you could replace hostName in step 4) of this page directly with the (static) ip address of the host. At this point you should probably better try CIFS or, if that fails too, you would have to use the Shared Folder feature from VMware Workstation.
Note: If you are trying to set up CIFS or SMBFS with another Linux installation than the Debian VMware Appliance you may need the same workaround I did with creating a local boot command file which calls the mount -a command at the end of the boot sequence after the initial mounting of the remote file system failed.
|Home ии System ии Machine|