[Nix-dev] Samba - default configuration file location?

Eelco Dolstra e.dolstra at tudelft.nl
Tue Apr 14 14:48:43 CEST 2009


Hi,

Marc Weber wrote:

> I've some trouble with the default configuration file of samba.
> The derivation code states that some samba tools have to have a
> configuration file.
> 
> The default has been $out/lib/smb.conf or such in the past.
> 
> However that's a problem for smbpasswd (That should'nt get its password
> database file locations form the $out/lib/smb.conf, rather by a file
> generated by nixos such as /etc/samba/smb.conf)

Yes.

> However I'd like to ask you wether you'd prefer not changing the default but wrapping
> all the samba tools (such as smbpasswd) when adding them to the system path so
> that smbpasswd works ?

No, using a wrapper would be overkill.

> If you don't reply I'll commit this small patch within the next days.
> 
> Are you fine with nixos creating /etc/samba/smb.cnf even when not enabling the
> samba daemon only to shut up samba tools (which a user might have installed)?

That's fine as long as there is no actual dependency on Samba.

> ------------------------ pkgs/servers/samba/default.nix ------------------------

Some comments:

> index 0464943..e994733 100644
> @@ -1,5 +1,9 @@
>  { stdenv, fetchurl, readline, pam, openldap, kerberos, popt
>  , iniparser, libunwind, fam, acl
> +
> +# set this to "" to get the old behaviour using $out/lbi/smb.conf as empty stub
> +# config  to shut up programs like smbclient and smbspool
> +, configdir ? "/etc/samba"

The value of "configdir" is apparently not used anywhere (except in "[ -z ...
]").  So does this even work?

It should be "configDir", not "configdir".

Also, please check your spelling/grammar in comments.  They're fairly hard to read.

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list