[linux-cifs-client] Problem mounting Win2k shares with mount.cifs

Fabiano Felix felix at getnet.com.br
Fri Apr 16 15:26:51 GMT 2004


Hi All,

About Salomon problems, I would like to add more data about and reports/debug of the applications.

I'm having the same problem, but I'm using Samba as the server. I tested it using:
- SLES8 + Samba-2.2.5
- SUSE Professional 9.0 + Samba-3.0.3pre1 (RPM package by SUSE ftp)
- Windows XP Professional (this is only a member server of a Samba domain)

I enabled the CIFS debug (echo 1 > /proc/fs/cifs/cifsFYI) to provide more information about this problem.

If I use an user that have a valid password, I can't connect to a share (in all S.O. listed bellow), and receive the following error:
"
mount error 22 = Invalid argument
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
"


In the file /var/log/messages, I have:
"
Apr 16 11:36:12 felix kernel:  connect.c: CIFS VFS: in cifs_mount as Xid: 24 with uid: 0
Apr 16 11:36:12 felix kernel:  connect.c: Entering cifs_mount. Xid: 24 with: unc=//192.168.0.67\temp,ip=192.168.0.67,ver=1,user=felix,domain=felix,password=senha
Apr 16 11:36:12 felix kernel:  connect.c: Domain name set
Apr 16 11:36:12 felix kernel:  connect.c: Username: felix
Apr 16 11:36:12 felix kernel:  connect.c: UNC: \\192.168.0.67\temp
Apr 16 11:36:12 felix kernel:  connect.c: Socket created
Apr 16 11:36:12 felix kernel:  connect.c: Demultiplex PID: 2609
Apr 16 11:36:12 felix kernel:  connect.c: Existing smb sess not found
Apr 16 11:36:12 felix kernel:  transport.c: For smb_command 114
Apr 16 11:36:12 felix kernel:  transport.c: Sending smb of length 47
Apr 16 11:36:12 felix kernel:  connect.c: Peek length rcvd: 36 with smb length: 97
Apr 16 11:36:12 felix kernel:  connect.c:  Mid 0x30 matched - waking up
Apr 16 11:36:12 felix kernel:  asn1.c: cls = 1 con = 0 tag = 14
Apr 16 11:36:12 felix kernel:  connect.c: Security Mode: 0x3 Capabilities: 0x80e3fd Time Zone: 180
Apr 16 11:36:12 felix kernel:  connect.c: In sesssetup
Apr 16 11:36:12 felix kernel:  transport.c: For smb_command 115
Apr 16 11:36:12 felix kernel:  transport.c: Sending smb of length 228
Apr 16 11:36:12 felix kernel:  connect.c: Peek length rcvd: 36 with smb length: 39
Apr 16 11:36:12 felix kernel:  connect.c:  Mid 0x31 matched - waking up
Apr 16 11:36:12 felix kernel: Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
Apr 16 11:36:12 felix kernel:  netmisc.c:  !!Mapping smb error code 5 to POSIX err -13 !!
Apr 16 11:36:12 felix kernel:  CIFS VFS: Send error in SessSetup = -13
Apr 16 11:36:12 felix kernel:  connect.c: Error on sock_recvmsg(peek) length = -512
Apr 16 11:36:12 felix kernel:  connect.c: About to exit from demultiplex thread
Apr 16 11:36:12 felix kernel:  connect.c: CIFS VFS: leaving cifs_mount (xid = 24) rc = -13
Apr 16 11:36:12 felix kernel:  CIFS VFS: cifs_mount failed w/return code = -13
"


and on captured network session (with ethereal):
"
000000 192.168.0.67 -> 192.168.0.67 TCP 1643 > 38599 [SYN] Seq=1285651615 Ack=0 Win=32767 Len=0
0.000038 192.168.0.67 -> 192.168.0.67 TCP 38599 > 1643 [RST, ACK] Seq=0 Ack=1285651616 Win=0 Len=0
0.000073 192.168.0.67 -> 192.168.0.67 TCP 1644 > 445 [SYN] Seq=1285651618 Ack=0 Win=32767 Len=0
0.000105 192.168.0.67 -> 192.168.0.67 TCP 445 > 1644 [SYN, ACK] Seq=1293550293 Ack=1285651619 Win=32767 Len=0
0.000137 192.168.0.67 -> 192.168.0.67 TCP 1644 > 445 [ACK] Seq=1285651619 Ack=1293550294 Win=32767 Len=0
0.000303 192.168.0.67 -> 192.168.0.67 SMB Negotiate Protocol Request
0.000324 192.168.0.67 -> 192.168.0.67 TCP 445 > 1644 [ACK] Seq=1293550294 Ack=1285651670 Win=32767 Len=0
0.006089 192.168.0.67 -> 192.168.0.67 SMB Negotiate Protocol Response
0.006135 192.168.0.67 -> 192.168.0.67 TCP 1644 > 445 [ACK] Seq=1285651670 Ack=1293550391 Win=32767 Len=0
0.010210 192.168.0.67 -> 192.168.0.67 SMB Session Setup AndX Request, User: getnet\felix
0.017357 192.168.0.67 -> 192.168.0.67 SMB Session Setup AndX Response, Error: STATUS_LOGON_FAILURE
0.053213 192.168.0.67 -> 192.168.0.67 TCP 1644 > 445 [FIN, ACK] Seq=1285651904 Ack=1293550430 Win=32767 Len=0
0.056178 192.168.0.67 -> 192.168.0.67 TCP 445 > 1644 [FIN, ACK] Seq=1293550430 Ack=1285651905 Win=32767 Len=0
0.056241 192.168.0.67 -> 192.168.0.67 TCP 1644 > 445 [ACK] Seq=1285651905 Ack=1293550431 Win=32767 Len=0
"


The only time that I obtained sucess I changed the Samba mode to "SHARE" and tested with a user that have a "blank password (valid)".  Using this mode, if the user has a valid password not blank, I can't connect to the server (very strange)!!!

My Linux client is a SUSE 9.0 with kernel 2.4.21-202. For test, I compiled the lastest version of "mount.cifs".

Regards,

Fabiano Felix



Date: Thu, 15 Apr 2004 09:27:57 -0300 
 From: Roberto Salomon <salomon at techisa.srv.br> 
 Subject: Re: [linux-cifs-client] Problem mounting Win2k shares with 
 mount.cifs 
 To: linux-cifs-client at lists.samba.org 
 Message-ID: <1082032077.4777.17.camel at salomon.techisa> 
 Content-Type: text/plain 
 
 I have been doing some tests regarding the problem I have been facing 
 with mount.cifs and I was able to solve the problem: 
 
 The original problem is that when attempting to mount a share on a Win2K 
 box from a Linux workstation with the command: 
 
 mount -t cifs //server/share /media/smb -o 
 user=TestUser,password=password,domain=TESTDOMAIN 
 
 I was getting the following error: 
 
 mount error 13 = Permission denied. 
 
 There was no problem in performing the mount using smbfs so the user and 
 password were valid. 
 
 I just tried a hunch and it worked. The working syntax is: 
 
 mount -t cifs //server/share/media/smb -o 
 user=TestUser/TESTDOMAIN,password=password 
 
 Apparently, mount.cifs does not compound the domain name with the 
 username when attempting to logon even when the domain is specified by 
 the appropriate parameter. This results in an invalid logon from the 
 server's perspective resulting in the "Permission denied" response. 
 
 Would this behavior be considered a bug or a restriction? 
 
 Thanks, 
 
 Salomon 



More information about the linux-cifs-client mailing list