froggy> samba testparm ./smb.conf
Load smb config files from ./smb.conf
params.c:OpenConfFile() - Unable to open configuration file "./smb.conf":
No such file or directory
Error loading services.
This is startling: ./smb.conf is a perfectly legal and
proper path. Truss/strace suggests that we are not in the
directory where we started, as open returns ENOENT:
9914: open64("./smb.conf", O_RDONLY) Err#2 ENOENT
By the same logic, it is not running from root, as ./usr/local/samba/lib/smb.conf fails as well.
This looks rather as if someone is calling chdir(1)
as a side-effect, as there is no deliberate call
to chdir in tbe path from testparm:main() to the
Amit, please look into this. First make sure you can reproduce Dave's
The problem David reported can not be re-produced. (I could not).
To my knowledge ... exactly similar output I got when the file (smb.conf) was not present in the current directory (./smb.conf) . So that must have been the issue with David.
[quote] "By the same logic, it is not running from root, as
./usr/local/samba/lib/smb.conf fails as well. "[quote]
This is sure to fail. Because there won't be any valid directory structure like the one Used here .. unless David was in the root (/) directory ..
This might Help.