Samba could not be configured. Try again. Exception: Syntax error while checking the temporary samba config file

Samba failed to start. I restored my config from backup (brand new installation). AFP, NFS, and SMB services didn’t turn on. I could manually turn on AFP and NFS, but SMB gives this error. I rebooted, hoping it would magically pass… Samba still is disabled and giving this error when I enable it.

Brief description of the problem

Clicked the switch to enable samba

Detailed step by step instructions to reproduce the problem

Enable samba on a brand new build

Web-UI screenshot

Error Traceback provided on the Web-UI

Traceback (most recent call last): File "/opt/rockstor/src/rockstor/smart_manager/views/samba_service.py", line 78, in post update_global_config(global_config, adconfig) File "/opt/rockstor/src/rockstor/system/samba.py", line 156, in update_global_config test_parm(npath) File "/opt/rockstor/src/rockstor/system/samba.py", line 46, in test_parm raise Exception('Syntax error while checking the temporary ' Exception: Syntax error while checking the temporary samba config file

@gokev In the past few days we have had some recent changes in the testing channel updates to the samba config part of the code so if you could state what version of Rockstor you are using that would help. You could also try the spanner icon for Samba and then the Submit button there. What appears to be happening is a syntax error in the generated smb.conf file and internally Rockstor uses the samba tool "testparm -s to check for such things prior to putting the proposed smb.conf edits into play.

So currently I’m assuming that the new code is failing to correctly parse your restored smb.conf file.

If you could paste your existing smb.conf file (prior to trying anything else) into this thread and surround it in triple single inverted commas to preserve the formatting then it should be possible to reproduce your issue and track down what’s going wrong.

Thanks for your help with this issue, we haven’t had any other reports of this happening so we only have your example to go on currently so if it is a new problem then it would be good to get it sorted sooner rather than later. Obviously do take care to change any sensitive information in the file if that is an issue but don’t change any of the formatting as that may be the cause of the problem.

Ahh yes. This was an issue when I was using 3.8-14.04. I solved it with a fresh install, but never upgaded. I hadn’t seen this on my 3.8-14 current or previous installs, so I’ll assume it’s the .04 update.

I’m trying to decide if I’m bold enough to upgrade and try to break it :slight_smile:

@gokev OK but the issue is likely still there given you are the only reporter and 3.8-14.03 to 3.8-14.04 was the last samba fix (ie the 3.8-14.03 was the samba problem update), so if 3.8-14.04 displayed your issue then it still exists. Presumably there is something in your smb.conf file that is triggering this so it would help to get this sorted in the testing channel updates if you could submit your smb.conf. That way the issue could hopefully be re-produced and a fix found and committed. Then when you next update, after a fix is found and committed, you would be OK. Otherwise it may well still exist and cause issues upon your next upgrade. Rockstor depends on the users of the testing channel updates to find issues and help to fix them by submitting details and feedback as you have done here but in this case your smb.conf file may be the key to an as yet unidentified issue. That way you could help with resolving this issue without having to reproduce it again; which of course is more of an inconvenience.

Thanks anyway and glad you are up and running again; no worries if you don’t have the time as I expect this issue will come up again if it is not down to some rogue config arrangement that is seldom seen. The stable releases are just that but only as a result of the testing channel work, which as you see can involve breakage.

Do let us know how you get on.