Write local SID to correct DB file
Super Micro 12 bay.
I was able to reproduce this issue where the samba groups no longer are seen in Windows share permissions and only show up as an Unknown SID after altering the freenas hostname. I suspect the Samba server changes the netbios name and alters the main server SID and in turn all of these are orphaned. I ran into this once and found redoing the storage dataset's by scratch and groups fixed it. Yet I am now in production with this and a large amount of data all with the right permissions (just wrong windows SID group permissions it seems). Does anyone else have experience fixing this issue with the least intrusive way on a production system you just altered the hostname of? Is it a bug or is it expected, and how does one fix it with the least interruptions?
This happened in 11.0, and I am on 11.1-U1 which it happened again.
Also fixsid.py looked like it fixed the group issue, yet then the username was just an SSID in windows. I had to actually change the user id number for that user and then re-do the storage setup with permissions / run recursively to make the user work again. I am not sure why, I just know that things break when changing the hostname consistently.
#17 Updated by Dru Lavigne about 2 years ago
Method to test:
1) clear sid from freenas-v1.db
sqlite3 /data/freenas-v1.db 'UPDATE services_cifs SET cifs_SID = "";'
2) run the smb4.conf generation script
3) Verify that the SID was written to the db file correctly
sqlite3 /data/freenas-v1.db "SELECT cifs_SID from services_cifs;"