Apple - Connect to SMB server on startup

There's a number of options for doing this, but the easiest way is to just use your Login Items. More specifically:

  1. In the Finder, press CommandK (or click on the Go menu and select Connect to Server...)
  2. Now enter the server address
  3. Click on the Connect button
  4. IMPORTANT: If you're a registered user, when entering your login details you must ensure you enable the option for remembering your password in keychain
  5. Once connected, go to Apple > System Preferences > Users & Groups
  6. Select the Login Items tab
  7. Now navigate to the mounted server (e.g. on your desktop) and drag it to the Login Items list
  8. OPTIONAL: If you don't want the server window to open every time you startup, you can click on the Hide checkbox on the left of the server in the Login Items list

NOTES:

  • At step 4 the reason I say you must opt to remember the password is that macOS needs to remember this in order to be able to log in automatically!
  • At step 7, if you don't see the server mounted on your desktop, then go to Finder > Preferences > General and tick the checkbox for Connected servers.
  • Keep in mind that if for whatever reason your Mac can't connect to the server, this may in fact become more annoying then having to connect manually.

If your server doesn't mount on the desktop

If you can't get the server to mount on your desktop, try following these steps instead:

  1. Go to Apple > System Preferences > Users & Groups
  2. Select the Login Items tab
  3. Click on the + button at the bottom of the Login Items list
  4. In the window that opens, click on the server in your left Sidebar (or navigate to it)
  5. If you're not already connected to it, then connect to it through this window. (IMPORTANT: If you're a registered user, when entering your login details you must ensure you enable the option for remembering your password in keychain)
  6. Once connected, navigate to and select whichever folder on your server you use the most
  7. After a moment the add button will become active. Click on this
  8. Now the folder you selected at Step 6 will be added to your Login Items
  9. OPTIONAL: If you don't want the server window to open every time you startup, you can click on the Hide checkbox on the left of the server in the Login Items list

To show network mounted volumes (SMB, AFP, NFS, etc.) on your desktop, issue the following command in Terminal:

defaults write com.apple. finder ShowMountedServersOnDesktop —bool true