Re: mount SMB
- In reply to: Polytropon : "Re: mount SMB"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 30 Aug 2024 22:39:00 UTC
On Thu, 29 Aug 2024, Polytropon wrote: > 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=YOUR_WORKGROUP_NAME > > [SERVERNAME] > addr=123.456.789.10 > > [SERVERNAME:USERNAME] > password=TOPSECRET > > 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! First, know that I am also an old guy. You do not say if you are running this on a server, tablet or phone. Assuming it is not a phone I use this on a number of systems running an X11 window manager. Works fine and is IMO the best way to do this. Doug