|
How To Mount Win Drive To Linux VM |
|
|
Jun 18, 2007 at 12:00 AM |
|
# Note: ~ = home directory (/home/john) # Install smbfs: sudo apt-get install smbfs # Enable users to mount and umount the shares to their respective drives. chmod u+s /usr/bin/smbmnt chmod u+s /usr/bin/smbumount # Create directory where you will mount windows drive: mkdir ~/windowsC # mount share # This will mount the windows share("hostname\C$") to ("~/windowsC"). If you leave password out you will be prompted for the password. # fmask and dmask were added to enable read/write permissions. smbmount \\\\hostname\\C$ ~/windowsC -o username=domain\\WindowsLoginName,fmask=644,dmask=744 # or smbmount \\\\hostname\\C$ ~/windowsC -o username=domain\\WinUser,password=********,fmask=644,dmask=744 # Unmount drive when done: smbumount ~/windowsC # If you want to put MountC and UnmountC scripts into Nautilus File Browser right click menu: # Create MountC and UnmountC Scripts # MountC Script #!/bin/bash PASSWORD=`zenity --title "Login" --entry --text "Enter Password for windowsC" --hide-text` smbmount \\\\hostname\\C$ ~/windowsC -o username=domain\\WinUser,password=$PASSWORD,fmask=644,dmask=744 exit 0 # UnmountC Script #!/bin/bash smbumount ~/windowsC exit 0 # Make scripts executable: chmod 755 MountC chmod 755 UnmountC # Copy scripts into ~/.gnome2/nautilus-scripts directory # Right click on desktop and select Scripts->MountC # Enjoy
|