Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom smb.conf location #46

Closed
llamafilm opened this issue Aug 16, 2022 · 3 comments · Fixed by #48
Closed

Allow custom smb.conf location #46

llamafilm opened this issue Aug 16, 2022 · 3 comments · Fixed by #48

Comments

@llamafilm
Copy link

This looks like a cool project! I'd like to try it out but my smb.conf file is located at /usr/local/etc/ksmbd/smb.conf. The syntax is mostly the same as with regular samba. Could this tool be modified to allow custom config file location?

@joshuaboud
Copy link
Member

joshuaboud commented Aug 16, 2022

Yup that sounds like it shouldn't be too hard to pull off. In the meantime, you should be good to just create a symbolic link at /etc/samba/smb.conf and point it to /usr/local/etc/ksmbd/smb.conf as long as /etc/samba/smb.conf isn't being used by something else. After trying that, Cockpit's file access API replaces the file atomically when modifying, so the symbolic link will be replaced by a regular file. If you aren't using /etc/samba/smb.conf for something else, you can just create it with the following content just to make file-sharing happy:

[global]
	include = registry

and also put include = registry in your real smb.conf in the [global] section to make Samba use the net registry (where file-sharing actually stores its share definitions)

@joshuaboud
Copy link
Member

Or you can just put include = registry in your real smb.conf and ignore the warning message that it's misconfigured until custom config locations are implemented.

@llamafilm
Copy link
Author

Oh cool, I didn’t know about the registry! It sounds like this should work fine since you’re not even using that file. I will test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants