Quantcast
Channel: Active questions tagged terminal - Super User
Viewing all articles
Browse latest Browse all 526

How do I mount a SMB folder in macOS via Terminal?

$
0
0

I have been working on a bash script to have systems mount a shared SMB folder(Windows Server) to a local folder /usr/local/Installers on macOS 12.

I can create the folders just fine en mass to 100 clients with the bash script.

When I go to mount a folder:

username:password@toplevelfolder/folder1/folder2 No such file or directory (127)

Now, here is my full line with obvious identifiable info changed:

mount_smbfs smb://servername.domain.int;username@Software/APPLEDMG usr/local/Installers 

I have to be doing something wrong as this works:

open smb://Software/APPLEDMG

This opens a Finder window with the correct folder. However, I need to be able to mount to then copy a very large Adobe package I created from Adobe Admin to the machines locally to then run silently once to install the package.

This is being done en masse to almost a hundred Macs. Individually installing Adobe CC is extremely inefficient. Company also does not want to move out of JAMF School.

Not looking for alternatives or debates to change MDMs. If there are better terminal commands I can put into my bash script, I am all open for that.

Basically, I just need this order of operations:

  • Connect to our Windows file server.
  • Copy a .app/.pkg from that server to each local machine
  • Once the file has downloaded, run installer -pkg on that downloaded pkg file.
  • Unmount and cleanup.

I can already do things such as wipe networks/printers en masse with sudo level privileges after using su to swap to the local admin accounts. The issue is not credentials. I can also create the mounting point folders as well.

I just must be doing something wrong getting connected to the fileserver.

Any help would be appreciated.


Viewing all articles
Browse latest Browse all 526

Trending Articles