Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi all.
I have samba working on my Ubuntu box, but I need to have two config files for it (for some specific reason...).
Q. Is there a way to assign two different config files to one samba installation??
If yes, then how???
If no, I guess I'll have to install second samba. In this case how can I specify a different folder for it??
I don't know of a way to use two config files, however I have never tried. Are you wanting to use them at the same time or use one config file today and then the other tomorrow type of thing? If the latter, you can always rename the file to config_notused or something until you use it. And I don't think it's possible to run two instances of Samba on the same computer without virtualization.
If you are looking into virtualization, I'm not sure if Ubuntu comes with Xen installed, but it works very well. Also Virtualbox and I'm sure others can give a whole list of other virtualization software packages.
Well I don't think there is any need of virtualization here. Yes I want to run them simultaneously. The thing is that I have two network interfaces on the box, and I want to access two different folders with the same share name in case of different IP addresses (this will be done via the 'interfaces' parameter in smb.conf file). That's why I need to have two different config files (the 'interfaces' parameter has a global scope). Are you sure that I can't have two instances of a daemon on one box running at the same time??
I think installing a second samba server on the box will solve the issue. I just need to install it in a different root folder (maybe even rename the daemon). I just need to know how.
Ok, the post was really helpful, and I wouldn't finish without it, many thanks to michaelk.
Just want to tell about some corrections that I've in case if someone hits the same problem.
The most important thing is that we need to directly specify the piddir, lockdir and private-dir options.
Another thing is that localost must be specified as an interface only in one of the config file (otherwise the second daemon will try to bind port 139 to localhost which is already bound => error).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.