Mount Samba Shared Folder for Back in Time [SOLVED]

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
scrognoid
Level 3
Level 3
Posts: 199
Joined: Sat Oct 19, 2013 8:56 pm

Mount Samba Shared Folder for Back in Time [SOLVED]

Post by scrognoid »

I can get to my Windows shares with File Manager but not with Back in Time. I think I need a mount point or a fstab entry. I have found recent post that refer to smbfs but

sudo apt-get install smbfs

claims that is deprecated in favor of cifs. I also tried some gvfs commands that didn't work.

How do I mount a Samba shared folder so that a program like Back in Time can reach it?
OR
Is there a backup program as savy as File Manager is about Samba shares?
Last edited by scrognoid on Thu Nov 14, 2013 11:35 pm, edited 1 time in total.
Linux Mint 19.3 Mate; Dell XPS 13 (9343); Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz; 4 GB RAM
altair4
Level 20
Level 20
Posts: 10173
Joined: Tue Feb 03, 2009 10:27 am

Re: Mount Samba Shared Folder for Back in Time

Post by altair4 »

Note: When users post a question without specifying what OS and DE they are using I automatically assume it's the main edition with Cinnamon.

When you access a share through Nemo it creates a mount point at either of these two locations depending on what version of the OS you are using:

/home/user-name/.gvfs
/run/user/user-name/gvfs

Sadly, not all applications are gvfs aware so if you cannot point Back In Time to those locations I would suggest AutoFS:

HowTo: Save to a Samba Network Location in all Applications
: http://forums.linuxmint.com/viewtopic.php?f=42&t=144997
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
scrognoid
Level 3
Level 3
Posts: 199
Joined: Sat Oct 19, 2013 8:56 pm

Re: Mount Samba Shared Folder for Back in Time

Post by scrognoid »

LM15 Mate 64-bit. Mate is what The Manual recommended.
Linux Mint 19.3 Mate; Dell XPS 13 (9343); Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz; 4 GB RAM
altair4
Level 20
Level 20
Posts: 10173
Joined: Tue Feb 03, 2009 10:27 am

Re: Mount Samba Shared Folder for Back in Time

Post by altair4 »

When you access a share through Caja ( your File Manager ) it creates a mount point at this location: /run/user/user-name/gvfs

Sadly, not all applications are gvfs aware so if you cannot point Back In Time to that location I would suggest AutoFS:

HowTo: Save to a Samba Network Location in all Applications
: http://forums.linuxmint.com/viewtopic.php?f=42&t=144997[/quote]
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
scrognoid
Level 3
Level 3
Posts: 199
Joined: Sat Oct 19, 2013 8:56 pm

Re: Mount Samba Shared Folder for Back in Time

Post by scrognoid »

I followed the procedure in the topic which created /mnt/Samba/hpusers but it is empty. I tried a couple of things in auto.sambashares:
1) hpusers -fstype=cifs,rw,uid=1000,iocharset=utf8 ://hp/hpusers
2) hpusers -fstype=cifs,rw,uid=1000,iocharset=utf8 smb://hp/hpusers # because that's where File Manager thinks it is
Both leave /mnt/Samba/hpusers empty:

tim@oldDellLinux ~ $ ls /mnt/Samba/
hpusers
tim@oldDellLinux ~ $ ls /mnt/Samba/hpusers/
ls: cannot access /mnt/Samba/hpusers/: No such file or directory
tim@oldDellLinux ~ $

/run/user/tim/gvfs is populated after I run gvfs-mount but backintime can't point to it.
Linux Mint 19.3 Mate; Dell XPS 13 (9343); Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz; 4 GB RAM
altair4
Level 20
Level 20
Posts: 10173
Joined: Tue Feb 03, 2009 10:27 am

Re: Mount Samba Shared Folder for Back in Time

Post by altair4 »

Please post the output of the following command after you connect to the share in Caja or using gvfs-mount:

Code: Select all

ls -al /run/user/tim/gvfs
And this one:

Code: Select all

cat /etc/auto.sambashares
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
scrognoid
Level 3
Level 3
Posts: 199
Joined: Sat Oct 19, 2013 8:56 pm

Re: Mount Samba Shared Folder for Back in Time

Post by scrognoid »

tim@oldDellLinux ~ $ ls -al /run/user/tim/gvfs/
total 4
dr-x------ 3 tim tim 0 Nov 12 20:19 .
drwx------ 6 tim root 120 Nov 12 20:19 ..
drwx------ 1 tim tim 4096 Mar 28 2013 smb-share:server=hp,share=hpusers
tim@oldDellLinux ~ $ cat /etc/auto.sambashares
hpusers -fstype=cifs,rw,uid=1000,iocharset=utf8 ://hp/hpusers

Things keep changing on me, maybe related to 'hp', the laptop I'm trying to backup, goes to sleep regularly. This last time I couldn't get gvfs-mount to bring it up. I restarted everybody and still gvfs-mount didn't populate /run/user/tim/gvfs. I had to walk down with File Manager through Windows Network and enter a password. (I told it to remember forever so maybe that will take care of part of it.)
Linux Mint 19.3 Mate; Dell XPS 13 (9343); Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz; 4 GB RAM
altair4
Level 20
Level 20
Posts: 10173
Joined: Tue Feb 03, 2009 10:27 am

Re: Mount Samba Shared Folder for Back in Time

Post by altair4 »

I had to walk down with File Manager through Windows Network and enter a password. (I told it to remember forever so maybe that will take care of part of it.)
** If the server you are trying to access requires authentication then this is the wrong line in /etc/auto.sambashares:
hpusers -fstype=cifs,rw,uid=1000,iocharset=utf8 ://hp/hpusers
It should be this:

Code: Select all

hpusers -fstype=cifs,rw,username=name,password=secret,uid=1000,iocharset=utf8 ://hp/hpusers
Replace "name" and "secret" with their real values and you might want to make sure that 1000 is your actual uid number. You can verify that by running the following command:

Code: Select all

id
And don't forget to restart the autofs daemon:

Code: Select all

sudo service autofs restart
** Just a general observation:

gvfs and cifs ( which AutoFS is automating for you ) are two independent and unrelated processes. AutoFS knows nothing about a "smb://" syntax for example and the "remember forever" utility relates to the gvfs method not AutoFS. AutoFS just like a manual cifs mount requires that the user's credentials be explicitly passed as the corrected line in /etc/auto.sambashares above demonstrates.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
scrognoid
Level 3
Level 3
Posts: 199
Joined: Sat Oct 19, 2013 8:56 pm

Re: Mount Samba Shared Folder for Back in Time

Post by scrognoid »

Stil no joy.

tim@oldDellLinux ~ $ ls -al /mnt/Samba/
total 4
drwxr-xr-x 3 root root 0 Nov 13 14:15 .
drwxr-xr-x 3 root root 4096 Nov 13 14:15 ..
dr-xr-xr-x 2 root root 0 Nov 13 14:15 hpusers
tim@oldDellLinux ~ $ ls -al /mnt/Samba/hpusers/
ls: cannot access /mnt/Samba/hpusers/: No such file or directory

Similar from backintime. Still accessible via File Manager so I know they are up.
Linux Mint 19.3 Mate; Dell XPS 13 (9343); Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz; 4 GB RAM
User avatar
RobertLM78
Level 3
Level 3
Posts: 178
Joined: Sat Apr 28, 2012 4:19 am
Location: US

Re: Mount Samba Shared Folder for Back in Time

Post by RobertLM78 »

I don't know if this will help, but when I was having trouble with samba, I added the following to each entry for shared folders in /etc/samba/smb.conf. This is a sample entry from my Desktop folder, which I have shared:

[Desktop]
path = /home/robert/Desktop
writeable = yes
; browseable = yes
guest ok = yes
force user = robert
Dell Dimension 4600i, nVidia GeForce 6300, 4 GB RAM, Mint 17.3 32-bit (Rosa), MATE
Dell Latitude D400, Intel Graphics, 1 GB RAM, Mint 17 32-bit (Rebecca), MATE
Gateway DX4860, Sapphire Radeon HD 5450, 8 GB RAM, Mint 17.3 64-bit (Rosa), MATE
altair4
Level 20
Level 20
Posts: 10173
Joined: Tue Feb 03, 2009 10:27 am

Re: Mount Samba Shared Folder for Back in Time

Post by altair4 »

Let's mount this thing manually and work our way up.

*** If you currently have it mounted through the gvfs process unmount it so as to remove any interference.

*** Create a temporary folder:

Code: Select all

sudo mkdir /mnt/Temp
*** Then in a terminal mount the remote share using this command:

Code: Select all

sudo mount -t cifs -o username=name,password=secret,uid=1000 //hp/hpusers /mnt/Temp
Changing name and secret to whatever the server is expecting and 1000 to the correct uid.

If you get any error messages post them back to the forum. If not can you at least see the content of the hpusers share in /mnt/Temp?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
scrognoid
Level 3
Level 3
Posts: 199
Joined: Sat Oct 19, 2013 8:56 pm

Re: Mount Samba Shared Folder for Back in Time

Post by scrognoid »

tim@oldDellLinux ~ $ sudo mount -t cifs -o username=tim,password=secret,uid=1000 //hp/hpusers /mnt/Temp
mount error: could not resolve address for hp: Unknown error
tim@oldDellLinux ~ $ id
uid=1000(tim) gid=1000(tim) groups=1000(tim),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),125(sambashare)

Passwords where changed to protect the innocent.
Linux Mint 19.3 Mate; Dell XPS 13 (9343); Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz; 4 GB RAM
altair4
Level 20
Level 20
Posts: 10173
Joined: Tue Feb 03, 2009 10:27 am

Re: Mount Samba Shared Folder for Back in Time

Post by altair4 »

Change "hp" to the ip address of "hp". If the ip address is 192.168.0.100 then the line would read:
sudo mount -t cifs -o username=tim,password=secret,uid=1000 //192.168.0.100/hpusers /mnt/Temp

[1] Is "hp" a Windows machine, a Linux machine, or a NAS device of some sort?

[2] Can you ping the hp machine in this specific way:

Code: Select all

ping hp.local
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
scrognoid
Level 3
Level 3
Posts: 199
Joined: Sat Oct 19, 2013 8:56 pm

Re: Mount Samba Shared Folder for Back in Time

Post by scrognoid »

tim@oldDellLinux ~ $ sudo mount -t cifs -o username=tim,password=secret,uid=1000 //192.168.1.18/hpusers /mnt/Temp
tim@oldDellLinux ~ $ ls -al /mnt/Temp/
total 9
drwxr-xr-x 2 tim root 4096 Mar 28 2013 .
drwxr-xr-x 4 root root 4096 Nov 13 22:38 ..
drwxr-xr-x 0 tim root 0 Jul 14 2009 All Users
dr-xr-xr-x 0 tim root 0 Jul 14 2009 Default
drwxr-xr-x 0 tim root 0 Jul 14 2009 Default User
-rwxr-xr-x 0 tim root 174 Jul 14 2009 desktop.ini
drwxr-xr-x 0 tim root 0 Dec 15 2012 Guest
drwxr-xr-x 0 tim root 0 Oct 15 21:25 jennifer
dr-xr-xr-x 0 tim root 0 Mar 20 2013 Public
drwxr-xr-x 0 tim root 0 Mar 28 2013 River
drwxr-xr-x 0 tim root 0 Apr 23 2010 SwSetup
drwxr-xr-x 0 tim root 0 Oct 2 13:14 tim

hp is running windows 7.

tim@oldDellLinux ~ $ ping hp.local
ping: unknown host hp.local

Might this have something to with my PIA VPN? It is running on each machine on the LAN.
Linux Mint 19.3 Mate; Dell XPS 13 (9343); Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz; 4 GB RAM
altair4
Level 20
Level 20
Posts: 10173
Joined: Tue Feb 03, 2009 10:27 am

Re: Mount Samba Shared Folder for Back in Time

Post by altair4 »

OK, well at least we know the samba client is working.
Might this have something to with my PIA VPN? It is running on each machine on the LAN.
In every other one of your posts you state something - almost in passing - that describes some aspect of your network that is kind of important in debugging what's going on. "PIA" stands for "Private Internet Access"? I had to google that so clearly I have no idea if this is having an impact or not on what we are trying to accomplish.

What I do know is that you can in fact access "hp" directly by ip address.

*** The most efficient way to get to our ultimate goal is to give the hp box a static ip address. Then you can set /etc/auto.sambashares to that ip address:

Code: Select all

hpusers -fstype=cifs,rw,username=name,password=secret,uid=1000,iocharset=utf8 ://192.168.1.18/hpusers
Most routers can actually do that for you as they can assign the same ip address to a given MAC address and you don't have to do anything on the Win7 machine at all. You could also set the WIn7 to have a static ip address within the OS.

*** The next best way is to bring your Win7 box up to how every other OS in the world now finds each other by installing the following application:
[url=http://support.apple.com/kb/DL999]Bonjour Print Services for Windows v2.0.2[/url]

You may never actually use the application for it's intended purpose but it also installs mDNSResponder.exe which once installed automatically allows Linux and OSX machines to access it by it's mdns name: hp.local. So the line in autofs would look like this:

Code: Select all

hpusers -fstype=cifs,rw,username=name,password=secret,uid=1000,iocharset=utf8 ://hp.local/hpusers
You would be installing a non native networking protocol on a Windows box which some folks might object to and I can understand that.

*** By far the most inefficient and for a home network environment the most complicated way is to conform to Windows' netbios mechanism to access machines by name. I actually wrote a whole damn [url=http://forums.linuxmint.com/viewtopic.php?f=42&t=88146&start=0]HowTo on the subject[/url].

My advice would be to try the static ip address idea first.

EDIT: By the way to unmount that temporary cifs mount:

Code: Select all

sudo umount /mnt/Temp
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
scrognoid
Level 3
Level 3
Posts: 199
Joined: Sat Oct 19, 2013 8:56 pm

Re: Mount Samba Shared Folder for Back in Time [SOLVED]

Post by scrognoid »

Bonjour was installed on hp but broken. I clicked Repair and I'm golden.
Thank you.
Linux Mint 19.3 Mate; Dell XPS 13 (9343); Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz; 4 GB RAM
Post Reply

Return to “Newbie Questions”