Community discussions

MikroTik App
 
alchemyx
just joined
Topic Author
Posts: 24
Joined: Mon Apr 16, 2012 9:43 pm

Mounting Mikrotik samba shares under Linux

Fri Apr 20, 2012 4:34 pm

Hello,

Yesterday I upgraded to 5.14 to have samba shares. And it works just fine with Windows clients. But I can't to mount that shares in Linux (Ubuntu if that matters). Funny thing is that smbclient works, but mount -t cifs not. It looks like this:

Smbclient

# smbclient -U alchemyx \\\\<hostname>\\archiwum <password>
Domain=[MSHOME] OS=[Unix] Server=[MikrotikSMB]
smb: \> ls
  .                                   D        0  Fri Apr 20 14:00:48 2012
  ..                                  D        0  Thu Apr 19 21:13:13 2012
  ZSI-2.1-a1.tar.gz                       932958  Fri Apr 20 14:00:48 2012

		15552 blocks of size 4096. 19929 blocks available
But with mount:

# mount -t cifs -ouser=alchemyx,password=<password>  \\\\<hostname>\\archiwum\\ /mnt/ --verbosemount.cifs
 kernel mount options: ip=<ip>,unc=\\<hostname>\archiwum,,ver=1,user=alchemyx,pass=********
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

# dmesg -
[114456.139775] /build/buildd/linux-3.0.0/fs/cifs/cifsfs.c: Devname: \\<hostname>\archiwum\ flags: 0 
[114456.139781] /build/buildd/linux-3.0.0/fs/cifs/connect.c: Username: alchemyx
[114456.139785] /build/buildd/linux-3.0.0/fs/cifs/connect.c: file mode: 0x1ed  dir mode: 0x1ed
[114456.139841] /build/buildd/linux-3.0.0/fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 156 with uid: 0
[114456.139843] /build/buildd/linux-3.0.0/fs/cifs/connect.c: UNC: \\<hostname>\archiwum ip: <ip>
[114456.139858] /build/buildd/linux-3.0.0/fs/cifs/connect.c: Socket created
[114456.139859] /build/buildd/linux-3.0.0/fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo 0x6d6
[114456.140375] /build/buildd/linux-3.0.0/fs/cifs/connect.c: Error -111 connecting to server
[114456.140385] /build/buildd/linux-3.0.0/fs/cifs/connect.c: Socket created
[114456.140387] /build/buildd/linux-3.0.0/fs/cifs/connect.c: sndbuf 16384 rcvbuf 87380 rcvtimeo 0x6d6
[114456.140807] /build/buildd/linux-3.0.0/fs/cifs/transport.c: Sending smb:  total_len 72
[114456.142860] /build/buildd/linux-3.0.0/fs/cifs/connect.c: CIFS VFS: in cifs_get_smb_ses as Xid: 157 with uid: 0
[114456.142865] /build/buildd/linux-3.0.0/fs/cifs/connect.c: Demultiplex PID: 1239
[114456.142869] /build/buildd/linux-3.0.0/fs/cifs/connect.c: Existing smb sess not found
[114456.142874] /build/buildd/linux-3.0.0/fs/cifs/connect.c: rfc1002 length 0x82000004
[114456.142877] /build/buildd/linux-3.0.0/fs/cifs/cifssmb.c: secFlags 0x7
[114456.142880] /build/buildd/linux-3.0.0/fs/cifs/connect.c: Good RFC 1002 session rsp
[114456.142883] /build/buildd/linux-3.0.0/fs/cifs/transport.c: For smb_command 114
[114456.142886] /build/buildd/linux-3.0.0/fs/cifs/transport.c: Sending smb:  total_len 82
[114456.143825] /build/buildd/linux-3.0.0/fs/cifs/connect.c: rfc1002 length 0x51
[114456.143836] /build/buildd/linux-3.0.0/fs/cifs/transport.c: cifs_sync_mid_result: cmd=114 mid=1 state=4
[114456.143841] /build/buildd/linux-3.0.0/fs/cifs/cifssmb.c: Dialect: 2
[114456.143844] /build/buildd/linux-3.0.0/fs/cifs/cifssmb.c: negprot rc 0
[114456.143848] /build/buildd/linux-3.0.0/fs/cifs/connect.c: Security Mode: 0x3 Capabilities: 0x258 TimeAdjust: 10800
[114456.143852] /build/buildd/linux-3.0.0/fs/cifs/sess.c: sess setup type 1
[114456.143881] /build/buildd/linux-3.0.0/fs/cifs/transport.c: For smb_command 115
[114456.143885] /build/buildd/linux-3.0.0/fs/cifs/transport.c: Sending smb:  total_len 180
[114456.144849] /build/buildd/linux-3.0.0/fs/cifs/connect.c: rfc1002 length 0x27
[114456.144862] /build/buildd/linux-3.0.0/fs/cifs/transport.c: cifs_sync_mid_result: cmd=115 mid=2 state=4
[114456.144867] Status code returned 0xc000000d NT_STATUS_INVALID_PARAMETER
[114456.144872] /build/buildd/linux-3.0.0/fs/cifs/netmisc.c: Mapping smb error code 0xc000000d to POSIX err -22
[114456.144876] /build/buildd/linux-3.0.0/fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[114456.144880] /build/buildd/linux-3.0.0/fs/cifs/sess.c: ssetup freeing small buf ffff8800879b68c0
[114456.144884] CIFS VFS: Send error in SessSetup = -22
[114456.144888] /build/buildd/linux-3.0.0/fs/cifs/connect.c: CIFS VFS: leaving cifs_get_smb_ses (xid = 157) rc = -22
[114456.160068] /build/buildd/linux-3.0.0/fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 156) rc = -22
[114456.160071] CIFS VFS: cifs_mount failed w/return code = -22
So it seems like Linux isse, but it should work, shouldn't it? :). There is a firewall rule that accepts everything on INPUT from my Linux client so it is not it. Also I tried from behind that router, and from WAN port. Same thing.
 
alchemyx
just joined
Topic Author
Posts: 24
Joined: Mon Apr 16, 2012 9:43 pm

Re: Mounting Mikrotik samba shares under Linux

Fri Apr 20, 2012 4:41 pm

I did upgrade few minutes ago to 5.15, but still no luck.
 
nikolasc
just joined
Posts: 11
Joined: Wed Jun 04, 2008 10:30 am

Re: Mounting Mikrotik samba shares under Linux

Thu Sep 06, 2012 12:58 pm

I have the same problem.
I can browse the network shares from ubuntu via gui unity-gnome but i can not mount it.
Also i can't access them from network media player or android phones.
 
alchemyx
just joined
Topic Author
Posts: 24
Joined: Mon Apr 16, 2012 9:43 pm

Re: Mounting Mikrotik samba shares under Linux

Thu Sep 06, 2012 1:11 pm

I wonder if we can count it as a bug an try to ask Support to fix it? Because it seems
that samba shares from Mikrotik are only mountable using Windows, not any other
platform.
 
sash555
just joined
Posts: 11
Joined: Tue Nov 09, 2010 11:28 am

Re: Mounting Mikrotik samba shares under Linux

Wed Oct 10, 2012 8:02 pm

I have the same problem. Trying to mount from satellite receiver.
mount error(22): Invalid argument
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Mounting Mikrotik samba shares under Linux

Fri Oct 12, 2012 8:49 am

5.21 release will enable linux mounting of samba shares. 6.0rc1 should allow that already.
 
alchemyx
just joined
Topic Author
Posts: 24
Joined: Mon Apr 16, 2012 9:43 pm

Re: Mounting Mikrotik samba shares under Linux

Wed Oct 31, 2012 10:11 am

I can finally confirm that it works under Linux. Thank you!
 
User avatar
luqasz
Member Candidate
Member Candidate
Posts: 101
Joined: Thu Aug 16, 2007 9:53 pm
Location: Poland

Re: Mounting Mikrotik samba shares under Linux

Fri Dec 20, 2013 12:21 am

hi

i am unable to mount a share via mount.cifs under ubuntu 12.04

output from dmesg
[ 6994.728621] CIFS VFS: NTLMSSP requires Unicode support
[ 6994.728631] CIFS VFS: Send error in SessSetup = -38
[ 6994.728820] CIFS VFS: cifs_mount failed w/return code = -38
output from mount command
sudo mount.cifs //172.30.30.1/pub /tmp/remote -o user=ukasz
Password: 
mount error(38): Function not implemented
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
ros version 6.7
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26950
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Mounting Mikrotik samba shares under Linux

Fri Dec 20, 2013 11:26 am

in RouterOS 6.8 we will have SMB 2.0 and a completely new implementation, so better to test that. If you wish to see the pre-release, email support
 
User avatar
luqasz
Member Candidate
Member Candidate
Posts: 101
Joined: Thu Aug 16, 2007 9:53 pm
Location: Poland

Re: Mounting Mikrotik samba shares under Linux

Fri Dec 20, 2013 11:49 am

in RouterOS 6.8 we will have SMB 2.0 and a completely new implementation, so better to test that. If you wish to see the pre-release, email support
you mean smb 2.0 protocol version ?
i will send email to support. where shall i post my issues/observations with pre-release ?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26950
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Mounting Mikrotik samba shares under Linux

Fri Dec 20, 2013 12:03 pm

in RouterOS 6.8 we will have SMB 2.0 and a completely new implementation, so better to test that. If you wish to see the pre-release, email support
you mean smb 2.0 protocol version ?
i will send email to support. where shall i post my issues/observations with pre-release ?
problems should always be reported to support. this is a user forum, and developers don't read it (much)
 
User avatar
honzam
Forum Guru
Forum Guru
Posts: 2399
Joined: Wed Feb 27, 2008 10:27 pm
Location: Czech Republic

Re: Mounting Mikrotik samba shares under Linux

Fri Dec 20, 2013 12:32 pm

and developers don't read it (much)
And that's a shame. They could read a lot of interesting problems...
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26950
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Mounting Mikrotik samba shares under Linux

Fri Dec 20, 2013 12:33 pm

and developers don't read it (much)
And that's a shame. They could read a lot of interesting problems...
they do read, but reports need to be tested, and that is done by support department and testing department, before they are submitted as genuine bugs.