Mounting Remote Windows Share

Windows Access Rights Management
pascone
Know my way around
Posts: 146
Joined: Thu May 21, 2009 1:00 am

Mounting Remote Windows Share

Post by pascone » Fri Mar 16, 2012 12:06 am

I am trying to access Windows Shares \\<Server>\<Share> from my QNAP but can't figure out where this is accomplished? I played with Iscsi on both the QNAP and Windows side with no luck.
Is there a walkthrough somewhere?
Thanks!

User avatar
schumaku
Guru
Posts: 43664
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: Mounting Remote Windows Share

Post by schumaku » Fri Mar 16, 2012 1:02 am

Thre is no simple click and shoot solution on the NAS Web UI available.

You can temporarely mount a Windows share form the command line. Assuming you intend to access the remote share as part of an existing share:

[~] # mkdir /share/Public/WindowsShare
[~] # mount.cifs //192.168.12.34/sharename /share/Public/WindowsShare -o username=user,password=pass

tstein
Starting out
Posts: 22
Joined: Thu Jan 07, 2010 5:11 am

Re: Mounting Remote Windows Share

Post by tstein » Sun May 06, 2012 10:25 am

How do you mount the share permanently on every boot-up?

User avatar
trejder
Know my way around
Posts: 182
Joined: Fri Jan 07, 2011 5:13 am

Re: Mounting Remote Windows Share

Post by trejder » Wed May 09, 2012 9:29 pm

I don't know, if this will help you, but for a completely different purpose, I use following script:

Code: Select all

mount -t ext2 /dev/mtdblock5 /tmp/config
nano /tmp/config/autorun.sh
umount /tmp/config

(replace nano with vi or any other text editor, if you don't have nano installed)

This script mounts flash memory, opens 'autorun.sh' in nano, saves changes after closing nano and unmounts memory.

This is solution my friend made for me, so I don't know much details. But it works fine. Whatever I put into authorun.sh is executed every time I restart my QNAP.
QNAP TS-210 with:
- RAID 0 Stripping Disk Volume using 2x2TB HDD (Samsung HD204UI),
- plus 1,5TB Ext USB HDD (Samsung HD154UI),
- and 0,75TB Ext USB HDD (WD MyPassport).
Latest firmware installed.

armandckj
Starting out
Posts: 31
Joined: Thu Jul 12, 2012 1:27 pm

Re: Mounting Remote Windows Share

Post by armandckj » Sat Apr 12, 2014 3:24 am

Hi,

I also have this strange problem:
""
mount.cifs //192.168.1.253/ua junk --verbose -o username=rsync
Password:

mount.cifs kernel mount options: unc=//192.168.1.253\ua,ver=1,username=rsync,ip=192.168.1.253,pass=********
mount error(5): Input/output error
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
"
dmesg output
"
[344903.350000] CIFS VFS: cifs_mount failed w/return code = -5
"

Again: I am also trying to mount a samba share on the qnap which has limited samba tools.
/usr/local/samba/bin/smbstatus is about all i could find.
i can mount this share (ua) in osx so it does seem te exist.

Actually i can produce the same error with a wrong user, password or a wrong share name.
Also the same dmesg output.

i read that you may need to ad sec=ntlm
it does not work. nor do krb5 etc.
still the same error.

any ideas?

Armand

User avatar
pwilson
Guru
Posts: 22568
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: Mounting Remote Windows Share

Post by pwilson » Sat Apr 12, 2014 3:29 am

schumaku wrote:Thre is no simple click and shoot solution on the NAS Web UI available.

You can temporarely mount a Windows share form the command line. Assuming you intend to access the remote share as part of an existing share:

[~] # mkdir /share/Public/WindowsShare
[~] # mount.cifs //192.168.12.34/sharename /share/Public/WindowsShare -o username=user,password=pass


No offense, but why would you recommend this insecure method of mounting? He should use a "credentials" file!

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.

User avatar
schumaku
Guru
Posts: 43664
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: Mounting Remote Windows Share

Post by schumaku » Sat Apr 12, 2014 3:43 am

You can temporarily mount ...
...perfect for a one-off or test usage.

User avatar
pwilson
Guru
Posts: 22568
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada (UTC-08:00)

Re: Mounting Remote Windows Share

Post by pwilson » Sat Apr 12, 2014 3:58 am

schumaku wrote:
You can temporarily mount ...
...perfect for a one-off or test usage.


Fair enough, but surely you could have mentioned use of a "credential" file for permanent use. If we teach them how to do it properly, we don't need to re-educate when the one-off effort has been concluded.

I respect you (you know I do), but I was disappointed by your response in this thread. We should never recommend using the username/password mount directives even for one-off testing. I'll shut up now.

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-470 Pro w/ 4 * Western Digital WD30EFRX WD Reds (RAID5) - - Single 8.1TB Storage Pool FW: QTS 4.2.0 Build 20151023 - Kali Linux v1.06 (64bit)
Forums: View My Profile - Search My Posts - View My Photo - View My Location - Top Community Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs

Please review: When you're asking a question, please include the following.

armandckj
Starting out
Posts: 31
Joined: Thu Jul 12, 2012 1:27 pm

Re: Mounting Remote Windows Share

Post by armandckj » Sat Apr 12, 2014 6:25 pm

Done some more testing.

"
mount.cifs //192.168.1.253/ua junk --verbose -o username=rsync
password:
mount error(5): Input/output error

"
Same error again.

But
"
mount -t cifs //192.168.1.253/ua junk --verbose -o username=rsync
mount: //192.168.1.253/ua: can't read superblock

"
No password is asked and the system return an other error.

"
mount -t smbfs //192.168.1.253/ua junk --verbose -o username=rsync
mount: wrong fs type, bad option, bad superblock on //192.168.1.253/ua,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

"
and dmesg reports
"
smbfs: mount_data version 1919251317 is not supported
"
This seems to indicate that the smbfs package is missing.

i also see
"
smbfs is deprecated and will be removed from the 2.6.27 kernel. Please migrate to cifs
"
but that was in dmesg yesterday. My kernel is 2.6.33.

So i will stick to cifs but that does not yet work.

Any tips?

Armand

User avatar
schumaku
Guru
Posts: 43664
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: Mounting Remote Windows Share

Post by schumaku » Sat Apr 12, 2014 6:50 pm

Both sides here are much to vague. Might happen the Windows machine with it's unspecified OS version is configured to whatever requirements i.e. for an authentication the mount.cifs in place can't deal with, to require SMB encryption, to require SMB 2/2.1 or SMB 3 at least, or it's set to a public place so the CIFS services are disabled and firewalled - who knows in absence of a crystal ball.

Then, when copy incomplete commands using relative path arguments - it does not say much without having an indication of the current directory for example.

armandckj
Starting out
Posts: 31
Joined: Thu Jul 12, 2012 1:27 pm

Re: Mounting Remote Windows Share

Post by armandckj » Sun Apr 13, 2014 2:20 am

Hi,
the first machine is a ts-119pII on firmware 4.05.

the second machine is an arcadyan adsl modem in the LAN.
i do not have more info on the modem. i do have access to that modem (ISP provided).
the share is configured in 'user mode'.

i am trying to mount the samba modem share to the qnap.

From osx it is mountable.
a test from ubuntu was also unsuccessful.
this time with error 56

i just tried mounting with the options vers=1.0, 2.0, 2.1 and 3.0 with and without sec=ntlm
same error 5.

thanks anyway.

Armand

User avatar
schumaku
Guru
Posts: 43664
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: Mounting Remote Windows Share

Post by schumaku » Sun Apr 13, 2014 9:34 pm

So not a Windows Share at all. :roll:

An "arcydian adsl" provided SMB share from a not further specified model, this is very weak information - even if ISP provided, the ISP has a name, and many more details are available on the box.

All these router based SMB implementations are poor and weak, mostly a marketing feature then something reasonable in my opinion.

armandckj
Starting out
Posts: 31
Joined: Thu Jul 12, 2012 1:27 pm

Re: Mounting Remote Windows Share

Post by armandckj » Wed Apr 16, 2014 9:04 pm

Thanks for the update.
Arcadyan with telfort (Dutch) ISP provided Firmware is about all the info i can gather.
it look like a closed linux release.

On the telfort forum i read that some linux distro's cannot access the 'user mode' smb share.
osx 10.9 can
ubuntu (a build from last year) cannot
Qnap 4.05 cannot

On the qnap the file /usr/bin/mount.cifs is linked to /usr/local/samba/sbin/smbd.
'mount.cifs //ip/share dir' gives some mount related results (well error 5 in my case) but
'smbd //ip/share dir' tells me this is not the correct usage.

man mount.cifs and man smbd als give very different usage.
thus i am puzzled by the link and how that works.

well, i will just keep on trying.

Update:
Speed is not an issue. The share is to be used as a rsync backup.
usually i have about 50mb a night to backup.
i already had such a setting with a FritzBox modem. The backup usually took about 10 minutes.

Armand
Last edited by armandckj on Wed Apr 16, 2014 9:31 pm, edited 1 time in total.

User avatar
schumaku
Guru
Posts: 43664
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: Mounting Remote Windows Share

Post by schumaku » Wed Apr 16, 2014 9:10 pm

Complain with your ISP about garbage hard and software.

armandckj
Starting out
Posts: 31
Joined: Thu Jul 12, 2012 1:27 pm

Re: Mounting Remote Windows Share

Post by armandckj » Fri Apr 25, 2014 3:43 pm

Hi again,
That would be the easy way :).
4.1 beta seems to have a newer samba: 3.6.23 versus 3.5.2 in 4.0.x.
i will test that on a separate test disk.

will be back.

Post Reply

Return to “Windows”