Persist the samba SID across reboots and upgrades

Ticket: #5683