From root@koellers.net  Sun Mar  4 01:57:51 2007
Return-Path: <root@koellers.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id B5A7C16A400
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  4 Mar 2007 01:57:51 +0000 (UTC)
	(envelope-from root@koellers.net)
Received: from sally.dts-online.net (sally.dts-online.net [212.62.69.126])
	by mx1.freebsd.org (Postfix) with ESMTP id 422A713C478
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  4 Mar 2007 01:57:51 +0000 (UTC)
	(envelope-from root@koellers.net)
Received: from door.koellers.net (static-87-245-51-164.teleos-web.de [87.245.51.164])
	by sally.dts-online.net (Postfix) with ESMTP id 6484C2995AF
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  4 Mar 2007 02:41:23 +0100 (CET)
Received: from door.koellers.net (localhost [127.0.0.1])
	by door.koellers.net (8.13.8/8.13.6) with ESMTP id l241fIgt029621;
	Sun, 4 Mar 2007 02:41:18 +0100 (CET)
	(envelope-from root@door.koellers.net)
Received: (from root@localhost)
	by door.koellers.net (8.13.8/8.13.8/Submit) id l241fIe1029620;
	Sun, 4 Mar 2007 02:41:18 +0100 (CET)
	(envelope-from root)
Message-Id: <200703040141.l241fIe1029620@door.koellers.net>
Date: Sun, 4 Mar 2007 02:41:18 +0100 (CET)
From: lkoeller@freebsd.org
Reply-To: lkoeller@freebsd.org
To: FreeBSD-gnats-submit@freebsd.org
Cc: lars@koellers.net
Subject: mount_smbfs didn't handle password authentication corrent
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         109827
>Category:       bin
>Synopsis:       mount_smbfs(8) didn't handle password authentication correctly
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 04 02:00:12 GMT 2007
>Closed-Date:    
>Last-Modified:  Thu Mar 15 16:20:03 GMT 2007
>Originator:     Lars Kller
>Release:        FreeBSD 6.2-RELEASE i386
>Organization:
Computing Center, University of Bielefeld, Germany
>Environment:
System: FreeBSD door.koellers.net 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Sat Jan 13 13:02:29 CET 2007 root@door.koellers.net:/backup/obj/usr/src/sys/DOOR i386

>Description:

	I try to mount a CIFS share from a samba server (mips little endian
	based linux wireles router).

	Access with smbclient and kde konqueror smb://server/share succeeded
	after password and username is requested. smbd logs:

[2007/03/04 01:43:15, 4] source/lib/substitute.c:automount_server(183)
  Home server: funk
[2007/03/04 01:43:15, 4] source/smbd/password.c:smb_password_ok(475)
  smb_password_ok: Checking SMB password for user lkoeller
[2007/03/04 01:43:15, 5] source/smbd/password.c:smb_password_ok(489)
  smb_password_ok: challenge received
[2007/03/04 01:43:15, 4] source/smbd/password.c:smb_password_ok(499)
  smb_password_ok: Checking NT MD4 password
[2007/03/04 01:43:15, 4] source/smbd/password.c:smb_password_ok(504)
  smb_password_ok: NT MD4 password check failed
[2007/03/04 01:43:15, 4] source/smbd/password.c:smb_password_ok(518)
  smb_password_ok: Checking LM password
[2007/03/04 01:43:15, 4] source/smbd/password.c:smb_password_ok(520)
  smb_password_ok: LM password check succeeded
[2007/03/04 01:43:15, 3] source/smbd/password.c:authorise_login(791)
  authorise_login: ACCEPTED: session list username (lkoeller) and given password ok


	When I try to mount with

	mount_smbfs -I funk.koellers.net -W MUSIC -u lkoeller //lkoeller@funk/multimedia /smb_funk

	the samba server shows tha the validation of the password failed.
	 The same smbd log part as above:

[2007/03/04 01:50:03, 4] source/lib/substitute.c:automount_server(183)
  Home server: funk
[2007/03/04 01:50:03, 4] source/smbd/password.c:smb_password_ok(475)
  smb_password_ok: Checking SMB password for user lkoeller
[2007/03/04 01:50:03, 5] source/smbd/password.c:smb_password_ok(489)
  smb_password_ok: challenge received
[2007/03/04 01:50:03, 4] source/smbd/password.c:smb_password_ok(499)
  smb_password_ok: Checking NT MD4 password
[2007/03/04 01:50:03, 4] source/smbd/password.c:smb_password_ok(504)
  smb_password_ok: NT MD4 password check failed
[2007/03/04 01:50:03, 4] source/smbd/password.c:smb_password_ok(518)
  smb_password_ok: Checking LM password
[2007/03/04 01:50:03, 4] source/smbd/password.c:smb_password_ok(523)
  smb_password_ok: LM password check failed
[2007/03/04 01:50:03, 2] source/smbd/password.c:pass_check_smb(575)
  pass_check_smb failed - invalid password for user [lkoeller]
[2007/03/04 01:50:03, 3] source/smbd/password.c:authorise_login(855)
  authorise_login: ACCEPTED: guest account and guest ok (samba)


	The mount_smbfs command succeeds, when using it between two FreeBSD
	servers!!!

	Perhaps a big/littele endian issue problem when submitting the password
	to the samba server?


>How-To-Repeat:



>Fix:
>Release-Note:
>Audit-Trail:

From: =?ISO-8859-1?Q?Lars_K=F6ller?= <lars@koellers.net>
To: bug-followup@FreeBSD.org, lkoeller@freebsd.org
Cc:  
Subject: Re: bin/109827: mount_smbfs(8) didn't handle password authentication
 correctly
Date: Thu, 15 Mar 2007 16:46:06 +0100

 Fiddle around a bit to set up a test environment. When I disable
 
 guest ok   = Yes
 
 in the smb.conf file on the Router, the mount_smbfs succeeds! So it 
 seems to be a problem of the auth process at all. Any idea? Is this a 
 normal behavior in a CIFS environment?
 
 Regards
 
 Lars
 
 
>Unformatted:
