Files
obsidian/tank/other/Samba shares miri.md
T
2026-05-07 14:39:10 +02:00

68 lines
3.1 KiB
Markdown
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
There are several ways to mount a Samba (SMB) share on macOS, ranging from a quick one-time connection to setting it up to reconnect automatically.
Here are the three most common methods:
---
### Method 1: Using Finder (The Easiest Way)
This is best for most users who need to access a share manually.
1. Open **Finder**.
2. In the top menu bar, click **Go** > **Connect to Server...** (or press `Command + K` on your keyboard).
3. In the "Server Address" field, type the address of the share using the `smb://` prefix:
* Example by IP: `smb://192.168.1.50`
* Example by Name: `smb://nas-server.local`
* Example to a specific folder: `smb://192.168.1.50/WorkSpace`
4. Click **Connect**.
5. If prompted, enter your **Username** and **Password**.
* *Tip: Check "Remember this password in my keychain" so you dont have to type it every time.*
6. Select the specific volume/folder you want to mount and click **OK**.
The share will now appear on your Desktop (if enabled) and in the Finder sidebar under "Locations."
---
### Method 2: Auto-Mounting (Reconnect on Login)
To ensure the share reconnects every time you restart your Mac:
1. Follow the steps in Method 1 above to mount the drive.
2. Go to the **Apple Menu ()** > **System Settings** (or System Preferences).
3. Go to **General** > **Login Items**.
4. Under the "Open at Login" list, click the **plus (+)** icon.
5. In the Finder window that pops up, find your mounted Network Share and click **Add**.
*Note: The share will now attempt to mount whenever you log in. If you are not on the same network (e.g., away from the office), you will get an error message.*
---
### Method 3: Using the Terminal (For Power Users/Scripts)
If you want to mount a share via the command line or a script:
1. Create a folder where the share will be "mounted" (usually in your `/Volumes` folder):
```bash
mkdir ~/Desktop/MYSAMBA
```
2. Use the `mount_smbfs` command:
```bash
mount_smbfs //username:password@servername/sharename ~/Desktop/MYSAMBA
```
*If your password has special characters, you will need to "URL encode" them (e.g., `@` becomes `%40`).*
---
### Method 4: Use an Alias (The "Quick Launch" method)
Once you have mounted a share using Method 1:
1. Right-click on the mounted drive icon on your desktop or in Finder.
2. Select **Make Alias**.
3. Drag that Alias to your desktop or your Dock.
4. In the future, simply double-clicking that alias will automatically trigger macOS to mount the network drive.
---
### Troubleshooting Tips
* **Windows Domain:** If you are connecting to a corporate Windows share, include the domain in the username: `DOMAIN\username` or use the format `smb://DOMAIN;username@server/share`.
* **Speed issues:** If the share is slow to load folders, you can prevent macOS from writing `.DS_Store` files to network shares. Open **Terminal** and type:
`defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE`
Then restart your Mac.
* **Connection Failed:** Ensure that your Mac and the Samba server are on the same local network or that you are connected via VPN.