Can not access network drive

More
09 Feb 2022 00:27 - 09 Feb 2022 00:33 #234365 by d2inventory
Let's try a manual mount then.

sudo mkdir /mnt/winshare
sudo mount -v -t cifs -o vers=2.1,username=YOURWINUSER,password=VERYSECRET //10.0.0.251/Users /mnt/winshare

if no error check if there is something in there

ls /mnt/winshare

You might need to change //10.0.0.251/Users to a directory you're sharing on the win box. I used Users to test for mine which worked, if you get an error try to change Users to c$ C$ or whatever is shared :D
Last edit: 09 Feb 2022 00:33 by d2inventory.

Please Log in or Create an account to join the conversation.

More
10 Feb 2022 17:41 #234494 by kenwoodhf
When I run Is/mnt/winshare I get
Default desktop.ini Guest Public

I am not very good using Linux system and I am confused trying to understand your next instructions

You might need to change //10.0.0.251/Users to a directory you're sharing on the win box. I used Users to test for mine which worked, if you get an error try to change Users to c$ C$ or whatever is shared

Please Log in or Create an account to join the conversation.

More
10 Feb 2022 23:20 #234535 by d2inventory
Very good so this means mounting it manually works.

Sorry, I kinda just assumed that you're familiar with this so I will give more detailed instructions now :D
The easiest way would be to get gvfs mounts to use SMB2.1 so thunar could work directly with Win7 shares, but I don't know how to do that.

So this is how it works for me, it's kinda a lot to read but you only need to do it once ;-)

First let's open a terminal and make sure you're in your home folder. First print your home dir and then your current dir
echo $HOME
pwd
both commands should output something like /home/YOUR_LINUX_USERNAME
where YOUR_LINUX_USERNAME obviously is your Linux username.

Make sure to replace YOUR_LINUX_USERNAME with your actual username in the following command, as well as YOUR_WIN_USERNAME with windows username and SECRET_PW with your password.
mkdir winshare

sudo mount -v -t cifs -o "vers=2.1,username=YOUR_WIN_USERNAME,password=SECRET_PW,uid=$USER,gid=$USER" //10.0.0.251/Users "$HOME/winshare"

This will mount the folder C:\Users on your windows machine onto the folder /home/YOUR_LINUX_USERNAME/winshare
If you open thunar you should be able to see this folder and browse around there.
I think you didn't replace the upper case username and password placeholders I gave you last time that's why you couldn't see the folder for the windows user. Now if you correctly replaced YOUR_WIN_USERNAME with the user and SECRET_PW with your pw you should see these folders in winshare:
Default
Guest
Public
YOUR_WIN_USERNAME
desktop.ini

So the folder you want to access is somewhere in YOUR_WIN_USERNAME.
For example if you share a folder on your win7 desktop with the name happy_gcode it would be:
/home/YOUR_LINUX_USERNAME/winshare/YOUR_WIN_USERNAME/Desktop/happy_gcode

This is the path we can use to mount the shared folder you want in your home directory.
If you found the folder you want to mount, you can unmount the share we mounted with:
sudo umount "$HOME/winshare"

Let's write a little script you can run to mount your share
and then a desktop symbol you can just doubleclick to run it.

First we open geany to create the script:
mkdir "$HOME/myscripts"
geany "$HOME/myscripts/mount_winshare.sh"

then you copy this code into the file and make sure to replace YOUR_WIN_USERNAME and SECRET_PW
and adjust the path to the folder you want to share (YOUR_WIN_USERNAME/Desktop/happy_gcode was my example)
#!/bin/bash

sudo mount -v -t cifs -o "vers=2.1,username=YOUR_WIN_USERNAME,password=SECRET_PW,uid=$USER,gid=$USER" //10.0.0.251/Users/YOUR_WIN_USERNAME/Desktop/happy_gcode "$HOME/winshare"

thunar "$HOME/winshare" 

save and exit

and now let's create the link on the desktop
geany "$HOME/Desktop/mount_winshare.desktop"

copy this into the file:
[Desktop Entry]
Version=1.0
Terminal=true
Name=Mount Winshare
Exec=bash /home/YOUR_LINUX_USERNAME/myscripts/mount_winshare.sh
Type=Application
Comment=Mounts the Windows Share in home directory
Icon=/usr/share/icons/Tango/scalable/places/folder-remote.svg
Name[en_US]=Mount Winshare

save and exit


now we need to make these files executable with:
chmod +x "$HOME/myscripts/mount_winshare.sh"
chmod +x "$HOME/Desktop/mount_winshare.desktop"

and if you look on the desktop now you should have an icon with the name "Mount Winshare" and if you double click it will ask for your password (because you need to mount as root) and then thunar will open with the mounted share.

I hope this will work out for you. If you want you can ask on IRC and I can give you live instructions :D
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
10 Feb 2022 23:40 - 10 Feb 2022 23:40 #234536 by d2inventory
oh yeah, i forgot, if it doesn't work first check that you replaced all
YOUR_LINUX_USERNAME
SECRET_PW
YOUR_WIN_USERNAME

everywhere
Last edit: 10 Feb 2022 23:40 by d2inventory.
The following user(s) said Thank You: kenwoodhf

Please Log in or Create an account to join the conversation.

More
11 Feb 2022 02:48 #234548 by kenwoodhf
Well definitely dazed and confused. BUT IT WORKED. Thank you very much.
Jan

Please Log in or Create an account to join the conversation.

More
11 Feb 2022 11:58 #234563 by d2inventory
Noice :D

Please Log in or Create an account to join the conversation.

Time to create page: 0.154 seconds
Powered by Kunena Forum