From nobody Thu Aug 29 20:06:03 2024 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wvsjh4wPfz52XnT for ; Thu, 29 Aug 2024 20:06:16 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.kundenserver.de", Issuer "Telekom Security ServerID OV Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wvsjh0m6Gz4Gvv for ; Thu, 29 Aug 2024 20:06:15 +0000 (UTC) (envelope-from freebsd@edvax.de) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=edvax.de; s=s1-ionos; t=1724961972; x=1725566772; i=freebsd@edvax.de; bh=vZB83gC/7jAGp7bVv/ahKzkomUkMwjCLACM9cD3xKMA=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:Message-Id:In-Reply-To: References:Reply-To:Mime-Version:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=WDPQ7jGrM2UMqhL4gWYzb9FSpyes57TjEyKZyfdvTq4KqpzMx6biqq0AK/zJ2vfP dFcnvWGSubNuMNjBLg1uGxwvVdL/ZDW9SyyqzXBjJAP5qIHwSLrec/RQd0IrYD9G2 W+znSd2Q7DAz+0ND3HxfBDLMAI1u6gz60IdwcJo3dAnZG3lSsweFzw2VAOGR3/otr E/FU9J29hy3s+3REJl6zCb9XrwyuIKmHwtcNdrxnecvi7MB25ZRwL8h1RvcWvAV9j U5JxGeaxxbeAu5YvrPmUvyeFcQB6mrnTp3c4vtpHvHXdaGej2w5ad2F/tsFvaoT0Q Te3fs2S1mxuop2lmmA== X-UI-Sender-Class: 55c96926-9e95-11ee-ae09-1f7a4046a0f6 Received: from terra.edvax.de ([79.197.155.145]) by mrelayeu.kundenserver.de (mreue108 [213.165.67.113]) with ESMTPSA (Nemesis) id 1N79ly-1s0Tu41q96-00yQOu; Thu, 29 Aug 2024 22:06:12 +0200 Received: from r56.edvax.de (r56 [10.200.1.11]) (authenticated bits=0) by terra.edvax.de (8.17.1/8.17.1) with ESMTPA id 47TK68Hx033907; Thu, 29 Aug 2024 22:06:08 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Thu, 29 Aug 2024 22:06:03 +0200 From: Polytropon To: Nikos Vassiliadis Cc: FreeBSD questions Subject: Re: mount SMB Message-Id: <20240829220603.c2c6fba0.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-questions@freebsd.org Sender: owner-freebsd-questions@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:61iLFJ5G3vq7hC9J6nAXftyU1x9ZA87LW/Ud46v8nHA6HIRPoAJ 5TJYMI2wOCI35tL4cLD/jwmLT7pHC3wDuUv6KDr7yp6px+n4NsZniZVp2Y11Ktt2PXptKdf Ys3a6mut3aNQlkRBodKkP9CxWABEEjEpEeqNjZXs7bzGx3PGx/A66t99c5BPhIAR1nz++h2 jZYpfks1jlu+fLH3tMd8w== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:kpERSqyXYwY=;NJwWtTER2YpKIScym/6OmgbLVNV 6xUIlaWskzrNSulIx+S1ZjWB40IGZmXEOB6qxM7nkPznR9qL9n9TKxEaRQta9Rtn94UVPsWaD ZIRoV+lC9Jpvix99JQiRiBRvPiGMKL1B/J6cwDoJKabBzarSOvYmx6sFZ2rz1/K4G+c9BnOs3 UBKRpUxii9uOY4vpe92C0vDUwGWbvZjIhypCl9fCfL5RsMNntqWEvmQ6bRRBYTe7r/g9psZOl a4wGjCMboqUQIB0AAtSURyRiI18QcmmoOAUU/TgWkna8A2/eyhFODIqsoDgQEv+OrJI9evFvw JLiYi7AcOQJ6b+Zw923K1rID+SDIKFTR7ee2UB/wiPevwzzJ5yOLzp1T2XviL/qJ2FcSRNWdC NMkzJs6/bqOQihTynH/B8fAxl9dhHc7eZ+2spWYTjoLQib+byLohKXyaOfLJnOeJaigNep71j 6jjI8WWFYQJtAXypJOLfsVvvNrpBRUX5Um3HP5ImXZJvorxFAEQ4xw7xbYBcMf7uOIzgmwy2C 04Z00mG4mYv4Do+hnYOgYulSKgamWSN2KrdnyAdjlQdddtmwEHRLJloD1iwGcoE7I727rTfGx XeBUCJQx18JRdN7p2+cduImX4jQpuuF4ZFgu2pvYeNOlrWPBcbgq/oeFPqwH4ofGm1sKziEKi LvLGjr/jIPYC91rnujdqsAwiIIL5dr/cFflYVK3FsHDIRjvgEQUJMLdMkyhqTwMjh39OM915D PFcX/eCUrePcmIap0I9p42DHfnp15FRPw== X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:8560, ipnet:217.72.192.0/20, country:DE] X-Rspamd-Queue-Id: 4Wvsjh0m6Gz4Gvv On Thu, 29 Aug 2024 12:34:59 +0200, Nikos Vassiliadis wrote: > I am looking for a way to mount SMB filesystems. I am using > smbnetfs successfully but I am not comfortable with the idea > of having the password of the share in a file. Would it be acceptable to have it in a file beneath /etc only being rw/--/-- and belonging to root:wheel? In that case, why not use FreeBSD's native mount_smbfs setup? In /etc/nsmb.conf: [default] workgroup=3DYOUR_WORKGROUP_NAME [SERVERNAME] addr=3D123.456.789.10 [SERVERNAME:USERNAME] password=3DTOPSECRET where SERVERNAME and USERNAME correspond to the server's name and the username you use to access the share (with the proper password). If no password is provided, mount will ask for it. See "man nsmb.conf" for details. Integrate it in /etc/fstab: //USERNAME@SERVERNAME/SHARENAME /smb/share smbfs rw,noauto 0 0 Add "drive letters" ("//blah.../c$") if absolutely needed. Leave out "noauto" if you want the system to mount the share at startup. If not, mount it like any normal filesystem interactively: # mount /smb/share Please note that this is "old man's advice" and may not apply anymore, because now you need a smartphone app and a paid subscription in order to mount SMB shares... ;-) There is also a FreeBSD Handbook chapter about SMB / CIFS and its integration. There's also a FAQ section. > Keep in mind that I am after a terminal-only solution and not > after a X11 file browser. The provided solution might work. Good luck! =2D- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...