Project

General

Profile

Bug #28063

Write local SID to correct DB file

Added by Christopher Kennedy over 1 year ago. Updated 11 months ago.

Status:
Done
Priority:
No priority
Assignee:
Andrew Walker
Category:
OS
Target version:
Seen in:
Severity:
Low Medium
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Super Micro 12 bay.

ChangeLog Required:
No

Description

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.

Thanks!


Related issues

Related to FreeNAS - Bug #39628: Fix function for storing SIDsDone

History

#1 Updated by Dru Lavigne over 1 year ago

  • Category set to OS
  • Assignee changed from Release Council to John Hixson
  • Target version set to 11.2-RC2
  • Seen in changed from 11.1-U1 to 11.1-U1

#2 Updated by John Hixson over 1 year ago

  • Assignee changed from John Hixson to Timur Bakeyev

#3 Updated by Nick Wolff about 1 year ago

  • Severity set to Low Medium

#4 Updated by John Hixson about 1 year ago

  • Assignee changed from Timur Bakeyev to John Hixson

#5 Updated by John Hixson about 1 year ago

  • Assignee changed from John Hixson to Andrew Walker

Andrew, since you're currently into the group mapping code, you can fix this as well ;-)

#6 Updated by Andrew Walker about 1 year ago

  • Status changed from Not Started to In Progress

#7 Updated by Andrew Walker about 1 year ago

#8 Updated by Andrew Walker about 1 year ago

It looks like we were storing the local SID in a temporary copy of the freenas config file rather than updating the actual freenas config. Regression introduced in https://github.com/freenas/freenas/commit/b8a034

#9 Updated by Dru Lavigne about 1 year ago

  • Target version changed from 11.2-RC2 to 11.2-BETA2

#10 Updated by Dru Lavigne about 1 year ago

  • Subject changed from When I rename the system hostname the group mapping for SAMBA breaks to Write local SID to correct DB file
  • Status changed from In Progress to Ready for Testing
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#12 Updated by Bonnie Follweiler 12 months ago

  • Status changed from Ready for Testing to Passed Testing
  • Needs QA changed from Yes to No

Test Passed in FreeNAS-11.2-MASTER-201807171249
(Build Date: Jul 17, 2018 15:52)

#13 Updated by Dru Lavigne 12 months ago

  • Status changed from Passed Testing to Done

#14 Updated by Dru Lavigne 12 months ago

  • Related to Bug #39628: Fix function for storing SIDs added

#15 Updated by Dru Lavigne 12 months ago

  • Status changed from Done to Ready for Testing
  • Needs QA changed from No to Yes

#17 Updated by Dru Lavigne 12 months 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

/usr/local/libexec/nas/generate_smb4_conf.py

3) Verify that the SID was written to the db file correctly

sqlite3 /data/freenas-v1.db "SELECT cifs_SID from services_cifs;"

#18 Updated by Dru Lavigne 12 months ago

  • Status changed from Ready for Testing to In Progress
  • Target version changed from 11.2-BETA2 to 11.1-U6
  • Needs Merging changed from No to Yes

#19 Updated by Dru Lavigne 12 months ago

  • Status changed from In Progress to Ready for Testing
  • Needs Merging changed from Yes to No

#20 Updated by Bonnie Follweiler 11 months ago

  • Status changed from Ready for Testing to Passed Testing
  • Needs QA changed from Yes to No

Passed Testing in FreeNAS-11.1-U6-INTERNAL3

#21 Updated by Dru Lavigne 11 months ago

  • Status changed from Passed Testing to Done

Also available in: Atom PDF