sudo mount_smbfs [-N] [-o options] [-d mode] [-f mode] [-h] existing
//[domain;][user[:password]@]server[/share] mount_point
Mounts a share from a remote server using SMB/CIFS protocol) like a MS windows share.
server: NetBIOS name of remote computer,
user: remote user name. If is omitted the logged in user id will be used.
share: resource name on a remote server.
-N |
mkdir /smb/public
mount -t smbfs //username:userpass@myserver/PUBLIC /smb/public
This example shows the proper url to use to mount the share PUBLIC from the SMB server myserver as guest:
mkdir /smb/public
mount -t smbfs //guest:@myserver/PUBLIC /smb/public
sudo mount -t smbfs //dgerman@smac14/data /Volumes/data0 mount_smbfs: mount error: /Volumes/data0: No such file or directory mount: /Volumes/data0 failed with 64
nsmb.conf
Configuration hierarchy is made up of sections, parameters and values.
[section_name]
- [default] †
- [SERVER]
- [SERVER:User]
- [SERVER:User:share]
may contain key = value lines.
| Keyword | Section | ||||||||||||||||||||||||||||||||||||||||||
d S U s
|
kerberos |
"NetBIOS" as used below means "NetBIOS over TCP/IP."
"How to use SMB TCP/UDP ports" can be one of:
no_netbios |
/etc/nsmb.conf global configuration file. not present on OSX 10.9.5 as of 11/26/14~/Library/Preferences/nsmb.conf
The user's configuration file, conflicts are superceeded by the global file.
# Configuration file for example.com
[default]
minauth=ntlmv2
streams=yes
soft=yes
notify_off=yes
domain=DOMAIN
[WIN98]
addr=windows98.apple.com
The default section specifies that only Kerberos and NTLMv2 authentication should be attempted; #defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE #defaults write com.apple.desktopservices UseBareEnumeration -bool TRUE
/etc/nsmb.conf
[default]
signing_required=no
Turn off packet signing on a macOS computer that hosts SMB shares:
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server SigningRequired -bool FALSE
smbutil
smbutil [-hv] command [-options
Controls SMB requester and issues commands.
-h | |||||||||||
nsmb.conf Keeps static parameters for connections and other information. See nsmb.conf for details.
; Configuration file for the Samba software suite.
; configuration option, man page for smb.conf(5). NA!
;
; Gives all clients access to their home directories and
; allows access to all printers specified in /etc/printcap.
; Parameters inside the required configuration block should not be altered.
; They may be changed at any time by upgrades or other automated processes.
;
; Site-specific customizations will only be preserved if they are done outside this block.
[global]
debug pid = yes
log level = 1
server string = Mac OS X
printcap name = cups
printing = cups
encrypt passwords = yes
use spnego = yes
passdb backend = odsam
idmap domains = default
idmap config default: default = yes
idmap config default: backend = odsam
idmap alloc backend = odsam
idmap negative cache time = 5
map to guest = Bad User
guest account = nobody
unix charset = UTF-8
display charset = UTF-8
dos charset = 437
vfs objects = notify_kqueue,darwinacl,darwin_streams
; Don't become a master browser unless absolutely necessary.
os level = 2
domain master = no
; For performance reasons, set the transmit buffer size to the maximum and enable sendfile support.
max xmit = 131072
use sendfile = yes
mangled names = no
stat cache = no
wide links = no
; The darwin_streams module gives us named streams support.
stream support = yes
ea support = yes
; Enable locking coherency with AFP.
darwin_streams:brlm = yes
; Core files are invariably disabled system-wide, but attempting to
; dump core will trigger a crash report, so we still want to try.
enable core files = yes
; Filter inaccessible shares from the browse list.
com.apple:filter shares by access = yes
; Check in with PAM to enforce SACL access policy.
obey pam restrictions = yes
; Make sure that we resolve unqualified names as NetBIOS before DNS.
name resolve order = lmhosts wins bcast host
; Pull in system-wide preference settings. These are managed by smb-sync-preferences.
include = /var/db/smb.conf no such file 3/26/23 Ventura
; Pull in system share configuration. managed by smb-sync-shares.
include = /var/db/samba/smb.shares no such file 3/26/23 Ventura
[printers]
comment = All Printers
path = /tmp
printable = yes
guest ok = no
create mode = 0700
writeable = no
browseable = no
; Site-specific parameters can be added below this comment.
; END required configuration.
sudo umount /Volumes/os # deletes mount point
64 mount point already exists, or remote share already mounted elsewhere. -1073741412 aka -3FFFFE64 72 cannot find that ... 77 Authentication error