Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

andrema2

macrumors member
Original poster
Apr 3, 2008
50
1
I need to have a network drive mapped as soon as it is available.

I had a script running in an older version of MacOs that used to work fine, but it is not working on Sonoma.
on idle
tell application "Finder"
if not (disk "NAS" exists) then
try
do shell script "mount -t smbfs //user: password@server-ip/NAS /NAS"
on error errStr number errorNumber
return 300
end try
end if
return 900
end tell

I tried to run the command and it says mount: /NAS: invalid file system.

Any ideas ?

Thanks
 
Last edited:

hendri

macrumors newbie
Nov 28, 2020
4
2
I'm not an expert in MacOS, but my Unix knowledge is high.
In the Unix/Linux world they use an automounter which task is to mount a network drive if it is needed.
 

Slartibart

macrumors 68040
Aug 19, 2020
3,142
2,817
that’s probably related to the smb version or multichannel behaviour the NAS (which smb version? which NAS model?) is using. Check /etc/nsmb.conf and make sure that protocol_vers_map=2 is set; to fully disable SMB Multichannel support in macOS, add mc_on=no
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.