smb4.conf gets deleted

Description

we are on FreeNAS 11.2-U4.1 and the smb4.conf file is missing and everytime we manually recreate it from the shell then save changes from the GUI to the smb config or try and start the service the file gets deleted. We can manually create the file from the shell and we can successfully start the service from the shell but then if we make changes from the GUI or stop the services from the GUI the smb4.conf file gets deleted again. The permissions are all as they should be, and one of our other freenas servers that is running on 11.2-U3 does not have this issue.

Problem/Justification

None

Impact

None

SmartDraw Connector

Katalon Manual Tests (BETA)

Activity

Show:

James July 29, 2019 at 9:58 PM

Yes, this still happens.  100% of the time.  The exact order of steps I mentioned break it.

Once smbfs.conf is deleted not just the domain but file sharing is broken.  At this point, most users will never get it working again and will have to reinstall.

I manually restored smbfs.conf multiple times.  Eventually it stopped being deleted (not sure why).  At this point I was able to create a domain and connect a windows 10 computer to it. 

Nothing a user should be able to do in the web admin should cause smbfs.conf to be deleted.

Dru Lavigne July 16, 2019 at 6:44 PM

is this still an issue for you? If so, configure your AD settings and try to connect to the domain. DO NOT START THE DOMAIN CONTROLLER SERVICE–it is unrelated and will nuke your AD config. If you still cannot connect to the domain, add the debug from the U5 system to this ticket.

James July 10, 2019 at 2:03 AM

tail /var/log/messages includes:

WARNING: /usr/local/etc/smb4.conf is not readable error

James July 10, 2019 at 1:59 AM

FYI I tested in 11.2-U5.

James July 10, 2019 at 1:53 AM

This problem is 100% repeatable. 

Debug trick

From the console used option 9 to drop to the shell.  Repeatedly "cat /usr/local/etc/smb4.conf".  Eventually the file will disappear.

Steps to reproduce:

I did a test install of 11.2-u5 under Hyper-V with two 35Gig virtual disks.  I installed FreeNAS to the first disk (sda0). 

 

Do initial install from ISO.

After initial install press 9 for shell.

cat /usr/local/etc/smb4.conf looks okay.

1) setup network interfaces (removed)

1) setup network interfaces (setup static ip)

4) setup default route

6) config dns

setup Default route

9) shell. repeatedly run cat /usr/local/etc/smb4.conf after doing each steps. Eventually the file will vanish.

Login web ui.

Dashboard -> check for updates (none available)

Network → Global. Change hostname = anything unique.  Save.

Services: start/stop SMB service

Storage → Disks. Wiped the 2ndary pool disk from my previous install just to make sure it's unrelated.

Services → Domain controller. Click edit and Create a new Domain controller.

realm = SAMDOM.SOMETHING.COM

domain = SAMDOM

SERVER ROLE = DC

DNS FORWARDER = IP of router/firewall

domain forest level = 2012_r2

I typed in the Administrator password. Clicked the eye ball to show passwords.

Copy pasted from password to confirm password.

Kerberos realm = left blank

Click save

Error: Start Domain controller service = “[EFAULT] Failed to update dataset: Dataset None/samba4 not found

NOTE: FreeNAS puts some of it's own storage on the first pool..Which doesn't exist yet.  I'm not sure if this is related to this problem (should nag to install a pool first if it's a prerequisite?) or if this is a separate issue.

In the console I see “GEOM_ELI: Device da1p1.eli destroyed”.

I start/stoppped SMB service. smb4.conf is still good.

 

Storage → Pools. Created a new pool on the second disk.

Services. SMB service has started itself??? I stopped it.

Services → Domain controler. Edit and try adding it again with same settings.  Save.

Checked...smb4.conf is still there.

 

Services -> Start domain controller service...it failed with “Domain Controller service failed to start.” and the smb4.conf file is now gone.

Related Breakage

If from the shell I touch /usr/local/etc/smb4.conf the file is there (but empty of course).

Starting and stop either the SMB service or the Domain Controller service will fail to start and the smb4.conf file is deleted again. 

 

Note sure if related: I did the install a few times before hand.  Each previous install I selected to wipe the target installation media drive during the install.  The second drive (test pool drive) was present during the install but not used for anything.

Probably Same bug

https://redmine.ixsystems.com/issues/59256

 

 

User Configuration Error
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Labels

Components

Fix versions

Affects versions

Priority

More fields

Katalon Platform

Created June 12, 2019 at 10:13 PM
Updated July 1, 2022 at 4:35 PM
Resolved June 13, 2019 at 12:15 AM