Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Samba ->win10 share -> Debian 10

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
Data007
Posts: 60
Joined: 2017-12-01 19:59

Samba ->win10 share -> Debian 10

#1 Post by Data007 »

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: 60
Joined: 2017-12-01 19:59

Re: Samba ->win10 share -> Debian 10

#2 Post by Data007 »

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.

andre@home
Posts: 398
Joined: 2011-10-02 08:00

Re: Samba ->win10 share -> Debian 10

#3 Post by andre@home »

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/

Data007
Posts: 60
Joined: 2017-12-01 19:59

Re: Samba ->win10 share -> Debian 10

#4 Post by Data007 »

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.

milomak
Posts: 2158
Joined: 2009-06-09 22:20
Been thanked: 1 time

Re: Samba ->win10 share -> Debian 10

#5 Post by milomak »

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: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid

Data007
Posts: 60
Joined: 2017-12-01 19:59

Re: Samba ->win10 share -> Debian 10

#6 Post by Data007 »

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: 60
Joined: 2017-12-01 19:59

Re: Samba ->win10 share -> Debian 10

#7 Post by Data007 »

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.

milomak
Posts: 2158
Joined: 2009-06-09 22:20
Been thanked: 1 time

Re: Samba ->win10 share -> Debian 10

#8 Post by milomak »

Data007 wrote:
milomak wrote: Yes I did install cifs-utils
what do you see from apt-cache policy cifs-utils

maybe reinstall it
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid

andre@home
Posts: 398
Joined: 2011-10-02 08:00

Re: Samba ->win10 share -> Debian 10

#9 Post by andre@home »

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

trinidad
Posts: 290
Joined: 2016-08-04 14:58
Been thanked: 14 times

Re: Samba ->win10 share -> Debian 10

#10 Post by trinidad »

"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.

Data007
Posts: 60
Joined: 2017-12-01 19:59

Re: Samba ->win10 share -> Debian 10

#11 Post by Data007 »

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: 60
Joined: 2017-12-01 19:59

Re: Samba ->win10 share -> Debian 10

#12 Post by Data007 »

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#

andre@home
Posts: 398
Joined: 2011-10-02 08:00

Re: Samba ->win10 share -> Debian 10

#13 Post by andre@home »

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?

Post Reply