I understand. The problem is that Umbrel, being a containerized system, overwrites the smb.conf file during every restart, reverting to default settings. To make the icon change permanent, you need to point Samba to an alternative, persistent configuration file.
Here’s how to do it:
Long-term Solution
- Create a persistent configuration file: Connect via SSH to your Umbrel and create a new configuration file in a directory that survives reboots (e.g., the
umbrel user’s home directory).
sudo nano /home/umbrel/smb.local.conf
- Add your configuration: Insert only the lines you want to change or add into the
smb.local.conf file. In your case:
[global]
fruit:model = Xserve
- Block the default file and point to the new one: Let’s create a simple startup script that will:
- Ensure Samba includes your persistent configuration.
- Configure Samba to use your file as an override.
Create the script file:
sudo nano /home/umbrel/smb-fix.sh
Paste the following content into it:
#!/bin/bash
# Wait a moment for the system to fully load
sleep 10
# Create the include file if it doesn't exist (safeguard)
touch /home/umbrel/smb.local.conf
# Check if our configuration is already included in the main smb.conf
if ! grep -q "include = /home/umbrel/smb.local.conf" /home/umbrel/.umbrel/app-data/core-samba/data/config/smb.conf; then
# Add the include line at the beginning of the global section if it's missing
sudo sed -i '/\[global]/a include = /home/umbrel/smb.local.conf' /home/umbrel/.umbrel/app-data/core-samba/data/config/smb.conf
fi
# Restart the Samba service to apply changes
sudo systemctl restart smbd
This script adds the line include = /home/umbrel/smb.local.conf to the [global] section of the default Samba configuration file. This makes Samba read your settings from the persistent file after reading the main configuration.
- Run the script at system startup: The simplest method is to add it to
crontab.
sudo crontab -e
If this is your first time, choose an editor (e.g., nano). Then, add the following line at the end of the file:
@reboot /home/umbrel/smb-fix.sh
Save and exit.
- Make the script executable and test it:
sudo chmod +x /home/umbrel/smb-fix.sh
# Run the script manually to check if it works without a reboot
sudo /home/umbrel/smb-fix.sh
After running it manually, check if the icon in your Mac’s Finder has changed to Xserve. If it works, you can safely restart your Umbrel to test if the changes survive the reboot.
Summary
This method is safer than directly editing Umbrel’s system files. Instead of fighting the system that overwrites files, you’re “hooking” into its operation by providing your own persistent configuration that gets included alongside the default one. The Xserve icon should now be permanent.