From owner-freebsd-current@freebsd.org Wed Mar 2 14:29:49 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6E86AC09AA for ; Wed, 2 Mar 2016 14:29:49 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BE3A1A87 for ; Wed, 2 Mar 2016 14:29:49 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.85) with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (envelope-from ) id <1ab7mc-003w0w-QL>; Wed, 02 Mar 2016 15:29:46 +0100 Received: from p578a69f9.dip0.t-ipconnect.de ([87.138.105.249] helo=freyja.zeit4.iv.bundesimmobilien.de) by inpost2.zedat.fu-berlin.de (Exim 4.85) with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (envelope-from ) id <1ab7mc-002Vgz-Fi>; Wed, 02 Mar 2016 15:29:46 +0100 Date: Wed, 2 Mar 2016 15:29:39 +0100 From: "O. Hartmann" To: "Reko Turja" Cc: "FreeBSD CURRENT" Subject: Re: mounting CIFS share (tcp/445) with FreeBSD and mount_smbfs(8) Message-ID: <20160302152939.17333d19@freyja.zeit4.iv.bundesimmobilien.de> In-Reply-To: <32E522F2674A4DEBBE2492D3A307A0C1@Rivendell> References: <20160301222004.4cdaafc9.ohartman@zedat.fu-berlin.de> <32E522F2674A4DEBBE2492D3A307A0C1@Rivendell> Organization: FU Berlin X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Originating-IP: 87.138.105.249 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2016 14:29:50 -0000 On Tue, 1 Mar 2016 23:39:22 +0200 "Reko Turja" wrote: > -----Original Message----- > From: O. Hartmann > Subject: mounting CIFS share (tcp/455) with FreeBSD and mount_smbfs(8) > > > > I need to mount a CIFS share from windows server 2012 r2 via CIFS, tcp/445 > > as NetBIOS service (tcp/139) has been deprecated due to serious > > vulnerability issues. . > > . > > . > > I desperately need CIFS and I need tcp/445 since tcp/139 is from now on > > firewalled. > > There's actually alternative available that's far more UNIX-friendly and not > depending on the SAMBA foibles. > > https://technet.microsoft.com/en-us/library/jj574143.aspx?f=255&MSPPError=-2147217396 > > Of course, you need to have admin access to the server or get the admins > enable NFS on it. > > -Reko > > (I've used the Windows NFS the other way around- FreeBSD NFS shares mounted > with on Win7.) _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" Using others than CIFS is impossible, I'm dependend on existing services. Within the next forseable time port tcp/139 gets firewalled. So far I have compiled NETSMB, SMBFS, LIBMCHAIN and LIBICONV (I think the latter two are prerequests for NETSMB/SMBFS, didn't find much in the very sparse and unfinished docs for that subject!) into the kernel. I found this following the exact subject I ran into: http://agreif.blogspot.de/2014/01/blog-post.html It doesn't work with either SAMBA 4.3 or Windows Server 2012 R2. Consider the following situation. Windows/samba server has IP 10.0.0.1, it's WINS name is locus, its domain is ASUF the user is pimmel. The passowrd is in /etc/nsmb.conf, hashed: [default] charsets=utf-8:utf-8 [LOCUS:PIMMEL] address=10.0.0.1 password=$$ajdhasuih57 The, following the above instructions, the mount_smbfs(8) command would be mount_smbfs -I10.0.0.1 -Wasuf -N //pimmel@10.0.0.1:445/share /mnt If -W is fed with ASUF (all uppercase), I get a strange error: mount_smbfs: invalid local charset specification (IT4) Connecting to the SAMBA 4.3 server, and with -Wasuf, I get mount_smbfs: unable to open connection: syserr = RPC struct is bad Connectingto the Windows 2012 R2 server results in mount_smbfs: unable to open connection: syserr = Connection reset by peer First, the manpage for mount_smbfs(8) is everything else than FreeBSD standard! There is an unexplained option "-n opt". What is that? Second, CIFS over tcp/445 seems to be now very(!) common in the Windooze world - why is that fact not reflected by FreeBSD? I tried to find some explanations/manpages for "man netsmb" or "smbfs" (the kernel options), but none found :-( My interpretation of the above errors are: FreeBSD is incapable to handle CIFS over tcp/445. The above URL/site claims to have solved the problem, but it seems not true for CURRENT.