Samba ->win10 share -> Debian 10

If none of the more specific forums is the right place to ask

Samba ->win10 share -> Debian 10

Postby Data007 » 2019-09-05 12:40

Hi
I have two computers on a local network,
comp1 runs win10 latest, has smb enabled ...
comp2 runs Debian 10, has samba installed ...

I would like comp2(Debian) to be able to browse a folder on a drive on comp1(win), this folder has many sub folders.

I have browsed the debian wiki on samba and tried to follow the steps in it however (kde)dolphin can see smb->workgroup->comp1
but not the folder, it don't exist as far as Debian is concerned.


My question how to set this up so comp2 can see folder-&-copy-files on comp1?
In win10 we have map-network-drive I would like to do the same in Debian?
But haven't a clue how to start, comp1/win10 will not be running all the time.
Data007
 
Posts: 57
Joined: 2017-12-01 19:59

Re: Samba ->win10 share -> Debian 10

Postby Data007 » 2019-09-06 10:21

I have gained access,however it is not sticky.

I added a line to fstab which adds a drive under network in remote(dolphin) this does not work.
I then went and under network->add network folder, and then filled in the details in the dialogue box that comes up, this works... However I must fill in the details each time I want to connect.

This is a wired conection if that helps, I am left with my two original questions, from post one.

My question how to set this up so comp2 can see folder-&-copy-files on comp1? <partial answer above>
In win10 we have map-network-drive I would like to do the same in Debian? But haven't a clue how to start, comp1/win10 will not be running all the time.
Data007
 
Posts: 57
Joined: 2017-12-01 19:59

Re: Samba ->win10 share -> Debian 10

Postby andre@home » 2019-09-07 17:03

Just enabling is not enough under Win 10, you also have to really share all the relevant folders.
Like this:
https://www.howtogeek.com/176471/how-to ... and-linux/
andre@home
 
Posts: 347
Joined: 2011-10-02 08:00

Re: Samba ->win10 share -> Debian 10

Postby Data007 » 2019-09-07 17:58

andre@home wrote:Just enabling is not enough under Win 10, you also have to really share all the relevant folders.
Like this:
https://www.howtogeek.com/176471/how-to ... and-linux/


Thanks for the prompt to an excellent article.

When I run the command,

Code: Select all
mkdir ~/Desktop/Windows-Share sudo mount.cifs //WindowsPC/Share /home/geek/Desktop/Windows-Share -o user=geek


I get this in the terminal
Code: Select all
mkdir: invalid option -- 'o'


These instructions where written so it says for Ubuntu, but I have tried previously other commands and have come accross this -o being a problem.
Data007
 
Posts: 57
Joined: 2017-12-01 19:59

Re: Samba ->win10 share -> Debian 10

Postby milomak » 2019-09-07 19:54

i believe that is meant to be either

Code: Select all
mkdir ~/Desktop/Windows-Share && sudo mount.cifs //WindowsPC/Share /home/geek/Desktop/Windows-Share -o user=geek


or

Code: Select all
mkdir ~/Desktop/Windows-Share
sudo mount.cifs //WindowsPC/Share /home/geek/Desktop/Windows-Share -o user=geek


that is, there are two commands in that instruction.
Desktop: iMac Late-2015 27" 5K Retina (17,1 - 3.3GHz) - MacOS and Windows 10 (Bootcamp)/ Sid (External SSD)
Laptop: Lenovo ideapad Y700 [nVidia Optimus] (64-bit) - Sid, Win10, Solus
Kodi Box: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
milomak
 
Posts: 1998
Joined: 2009-06-09 22:20

Re: Samba ->win10 share -> Debian 10

Postby Data007 » 2019-09-07 20:57

milomak wrote:i believe that is meant to be either

Code: Select all
mkdir ~/Desktop/Windows-Share && sudo mount.cifs //WindowsPC/Share /home/geek/Desktop/Windows-Share -o user=geek


or

Code: Select all
mkdir ~/Desktop/Windows-Share
sudo mount.cifs //WindowsPC/Share /home/geek/Desktop/Windows-Share -o user=geek


that is, there are two commands in that instruction.


I get now... that they are two commands. Firstly I am having trouble making myself sudo so Iam doing everything as root via su command.


The shell looks like this...... Iam deliberately altering my user here to xxx
Code: Select all
root@debian-10:/home/xxx/Videos# mount.cifs /desktop-s61m5ia/Video ~/home/xxx/videos/Windows-Share -o user=Xxx
bash: mount.cifs: command not found
root@debian-10:/home/xxx/Videos# ls
2watch Windows-Share
root@debian-10:/home/xxx/Videos#


Yes I did install cifs-utils
Data007
 
Posts: 57
Joined: 2017-12-01 19:59

Re: Samba ->win10 share -> Debian 10

Postby Data007 » 2019-09-08 03:16

I tried adding the following line to fstab

Code: Select all
//ip_address/video/ /home/xxx/Videos/2watch cifs ver="2.1",rw,soft,uid=ele,gid=ele,file_mode=0770,dir_mode=0770,credentials=/home/.smbcredentials 0 0


I get
Code: Select all
An error occurred while accessing 'Home', the system responded: mount: /home/xxx/Videos/2watch: operation permitted for root only.
Data007
 
Posts: 57
Joined: 2017-12-01 19:59

Re: Samba ->win10 share -> Debian 10

Postby milomak » 2019-09-08 09:41

Data007 wrote:
milomak wrote:Yes I did install cifs-utils


what do you see from apt-cache policy cifs-utils

maybe reinstall it
Desktop: iMac Late-2015 27" 5K Retina (17,1 - 3.3GHz) - MacOS and Windows 10 (Bootcamp)/ Sid (External SSD)
Laptop: Lenovo ideapad Y700 [nVidia Optimus] (64-bit) - Sid, Win10, Solus
Kodi Box: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
milomak
 
Posts: 1998
Joined: 2009-06-09 22:20

Re: Samba ->win10 share -> Debian 10

Postby andre@home » 2019-09-08 10:44

Got my tech magazine this weekend and there they also talked about SMB failures, which bring me to:
https://askubuntu.com/questions/922682/ ... -etc-fstab
had the same problem which was also due to an upgrade to one of my institute’s servers. I managed to mount the share by adding the vers=3.0 option to fstab without the -o argument.

Code: Select all
sudo mount -t cifs //192.168.1.100/Movies /mnt/Media vers=3.0,user=plex,uid=111,gid=1000,pass=PASSWORD
andre@home
 
Posts: 347
Joined: 2011-10-02 08:00

Re: Samba ->win10 share -> Debian 10

Postby trinidad » 2019-09-08 12:18

"I have gained access but it is not sticky." You cannot bookmark this in the normal way from file manager, however you can manually add the bookmark and file manager will remember the connection for you, and it will mount correctly every time afterwards. Add to ~/.gtk3.0/bookmarks: smb://IPv4address. Type it into the text file.

TC
You can't believe your eyes if your imagination is out of focus.
trinidad
 
Posts: 76
Joined: 2016-08-04 14:58

Re: Samba ->win10 share -> Debian 10

Postby Data007 » 2019-09-08 13:36

milomak wrote:
Data007 wrote:
milomak wrote:Yes I did install cifs-utils


what do you see from apt-cache policy cifs-utils

maybe reinstall it

root@debian-10:/home/xxx# apt-cache policy cifs-utils
cifs-utils:
Installed: 2:6.8-2
Candidate: 2:6.8-2
Version table:
*** 2:6.8-2 500
500 http://debian-archive.trafficmanager.net/debian buster/main amd64 Packages
100 /var/lib/dpkg/status
root@debian-10:/home/xxx#
Data007
 
Posts: 57
Joined: 2017-12-01 19:59

Re: Samba ->win10 share -> Debian 10

Postby Data007 » 2019-09-08 13:46

andre@home wrote:Got my tech magazine this weekend and there they also talked about SMB failures, which bring me to:
https://askubuntu.com/questions/922682/ ... -etc-fstab
had the same problem which was also due to an upgrade to one of my institute’s servers. I managed to mount the share by adding the vers=3.0 option to fstab without the -o argument.

Code: Select all
sudo mount -t cifs //192.168.1.100/Movies /mnt/Media vers=3.0,user=plex,uid=111,gid=1000,pass=PASSWORD


root@debian-10:/home/xxx# sudo mount -t cifs //192.168.1.100/Videos /mnt/Media vers=3.0,user=xxx,uid=111,gid=1000,pass=secret
mount: bad usage
Try 'mount --help' for more information.
root@debian-10:/home/xxx#
Data007
 
Posts: 57
Joined: 2017-12-01 19:59

Re: Samba ->win10 share -> Debian 10

Postby andre@home » 2019-09-08 14:13

Go back where it works but not permanent and then look at this article how to make it permanent.
http://jensd.be/229/linux/mount-windows ... secure-way

And... your fstab says user .... should it not be username?
I do not know how strict this is handled by the system under all conditions?
andre@home
 
Posts: 347
Joined: 2011-10-02 08:00


Return to General Questions

Who is online

Users browsing this forum: cooler01 and 11 guests

fashionable