Uli Luckas
2002-Aug-13 01:01 UTC
AW: [Samba] Unable to open configuration file "/etc/smb.conf"
Try these two: bash> which testparam should tell you which testparam is being started. Is it where you expect it to be? bash> strace /full/path/testparam Gives you information on all system calls called from within testparam. It will give quite a bit of output and somewhere near the end you will find something like: open("/usr/lib/smb.conf", O_RDONLY|O_LARGEFILE) = ... This would give you a hint to what testparam is trying to open and why it fails. Of course you need strace to be installed and you need to be root. Uli> -----Urspr?ngliche Nachricht----- > Von: nero one [mailto:nero_oner@yahoo.com] > Gesendet: Dienstag, 13. August 2002 00:44 > An: samba@lists.samba.org > Betreff: [Samba] Unable to open configuration file "/etc/smb.conf" > > > Sorry about the last email - hit the enter button by accident. > > I'm using Red Hat 7.0 in conjunction with samba version 2.2.5 > > When I try to run '#: testparm /etc/smbd.conf', i get the > following output: > > [root][~/install/tars]: testparm > Load smb config files from /usr/lib/smb.conf > params.c:OpenConfFile() - Unable to open configuration file > "/usr/lib/smb.conf": > Success > Error loading services. > > . . . > > [root][/etc]: ls -all | grep smb > -rw-r--r-- 1 root root 9643 Aug 6 02:59 smb.conf > > and the contents of smb.conf are : > > workgroup = WORKGRP > server string = SerVer > hosts allow = 10.0.0. 0. > load printers = yes > printcap name = /etc/printcap > printing = lprng > max log size = 500 > security = user > socket options = TCP_NODELAY > interfaces = 10.0.0.0/8 > local master = yes > os level = 33 > domain master = yes > preferred master = yes > domain logons = yes > dns proxy = no > > [homes] > comment = Home Directories > browseable = no > writable = yes > > [printers] > comment = Network Printers > path = /var/spool/samba > browseable = no > guest ok = no > writable = no > printable = yes > > [myshare] > comment = Common Storage > path = /home/common > valid users = user1 user2 user3 user4 > public = yes > writable = yes > printable = no > create mask = 0775 > directory mask = 0775 > > [apache] > comment = Apache tree > guest account = apache > path = /chroot/httpd/ > only guest = yes > public = yes > writable = yes > printable = no > create mask = 0775 > directory mask = 0775 > > [clients] > comment = Client trees > guest account = apache > path = /home/clients > only guest = yes > public = yes > writable = yes > printable = no > create mask = 0775 > directory mask = 0775 > > Any ideas what's going on? If there's a necessity for more > information, please email and let me > know. I'll be glad to put it up. > > > __________________________________________________ > Do You Yahoo!? > HotJobs - Search Thousands of New Jobs > http://www.hotjobs.com > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba >
John Benedetto
2002-Aug-13 05:41 UTC
AW: [Samba] Unable to open configuration file "/etc/smb.conf"
In the course of messages from "nero one", I have seen mention of these files: /etc/smb.conf /etc/smbd.conf /usr/lib/smb.conf /etc/samba/smb.conf (Not mentioned by other people, but by the original poster, "nero one".) Heck, your first message, a snippet included below, lists the first three. It looked to me like your original message references /usr/lib/smb.conf, but YOU were testing /etc/smbd.conf (according to what you cut 'n pasted, which is a wrong location - should be /etc/samba - and the wrong name - should be smb.conf, not smbd.conf). I'm just confused. I'm another vote for "use the defaults" if at all possible. - john --On Tuesday, August 13, 2002 11:59 AM +0200 Uli Luckas <Uli.Luckas@abakusag.de> wrote:> Try these two: > bash> which testparam > should tell you which testparam is being started. Is it where you expect > it to be? > bash> strace /full/path/testparam > Gives you information on all system calls called from within testparam. It > will give quite a bit of output and somewhere near the end you will find > something like: > open("/usr/lib/smb.conf", O_RDONLY|O_LARGEFILE) = ... > > This would give you a hint to what testparam is trying to open and why it > fails. > Of course you need strace to be installed and you need to be root. > > Uli > >> -----Urspr?ngliche Nachricht----- >> Von: nero one [mailto:nero_oner@yahoo.com] >> Gesendet: Dienstag, 13. August 2002 00:44 >> An: samba@lists.samba.org >> Betreff: [Samba] Unable to open configuration file "/etc/smb.conf" >> >> >> Sorry about the last email - hit the enter button by accident. >> >> I'm using Red Hat 7.0 in conjunction with samba version 2.2.5 >> >> When I try to run '#: testparm /etc/smbd.conf', i get the >> following output: >> >> [root][~/install/tars]: testparm >> Load smb config files from /usr/lib/smb.conf >> params.c:OpenConfFile() - Unable to open configuration file >> "/usr/lib/smb.conf": >> Success >> Error loading services. >> >> . . . >> >> [root][/etc]: ls -all | grep smb >> -rw-r--r-- 1 root root 9643 Aug 6 02:59 smb.conf >> >> and the contents of smb.conf are : >> >> workgroup = WORKGRP >> server string = SerVer >> hosts allow = 10.0.0. 0. >> load printers = yes >> printcap name = /etc/printcap >> printing = lprng >> max log size = 500 >> security = user >> socket options = TCP_NODELAY >> interfaces = 10.0.0.0/8 >> local master = yes >> os level = 33 >> domain master = yes >> preferred master = yes >> domain logons = yes >> dns proxy = no >> >> [homes] >> comment = Home Directories >> browseable = no >> writable = yes >> >> [printers] >> comment = Network Printers >> path = /var/spool/samba >> browseable = no >> guest ok = no >> writable = no >> printable = yes >> >> [myshare] >> comment = Common Storage >> path = /home/common >> valid users = user1 user2 user3 user4 >> public = yes >> writable = yes >> printable = no >> create mask = 0775 >> directory mask = 0775 >> >> [apache] >> comment = Apache tree >> guest account = apache >> path = /chroot/httpd/ >> only guest = yes >> public = yes >> writable = yes >> printable = no >> create mask = 0775 >> directory mask = 0775 >> >> [clients] >> comment = Client trees >> guest account = apache >> path = /home/clients >> only guest = yes >> public = yes >> writable = yes >> printable = no >> create mask = 0775 >> directory mask = 0775 >> >> Any ideas what's going on? If there's a necessity for more >> information, please email and let me >> know. I'll be glad to put it up. >>
nero one
2002-Aug-13 07:15 UTC
[Samba] Unable to open configuration file "/etc/smb.conf" (or wherever i specify)
--- Uli Luckas <Uli.Luckas@abakusag.de> wrote:> Try these two: > bash> which testparam > should tell you which testparam is being started. Is it where you expect it > to be? > bash> strace /full/path/testparam > Gives you information on all system calls called from within testparam. It > will give quite a bit of output and somewhere near the end you will find > something like: > open("/usr/lib/smb.conf", O_RDONLY|O_LARGEFILE) = ... > > This would give you a hint to what testparam is trying to open and why it > fails. > Of course you need strace to be installed and you need to be root.Good idea. Here's the result of the strace. I can't really figure out why it borks. "open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)" It seems to look for this file in /etc . . only I don't have any mention of any ld.so.preload* on my system. write(1, "Load smb config files from /etc/"..., 47Load smb config files from /etc/samba/smb.conf ) = 47 stat64("/etc/samba/smb.conf", {st_mode=S_IFREG|0644, st_size=1243, ...}) = 0 open("/etc/samba/smb.conf", O_RDONLY|O_LARGEFILE) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=1243, ...}) = 0 read(3, "", 0) = 0 close(3) = 0 write(1, "params.c:OpenConfFile() - Unable"..., 83params.c:OpenConfFile() - Unable to open configuration file "/etc/samba/smb.conf": ) = 83 write(1, "\tSuccess\n", 9 Success ) = 9 brk(0x80c0000) = 0x80c0000 write(1, "Error loading services.\n", 24Error loading services. ) = 24 munmap(0x129000, 4096) = 0 _exit(1) = ? Would it be broken due to the "..." as opposed to specifying /etc/samba/smb.conf? Seems that the fstat isn't returning with anything, and the read is expecting the fstat to do so? If anyone can help shed light on this - it'd be much appreciated. If there's anything else I can do to further help in resolving the problem, please let me know. We have already determined in prior emails that the configuration file is operational on other systems. Once again, the description of the issue is the following. The full result of the strace follows: [root][/etc/samba]: pwd && ls -all && testparm /etc/samba total 12 drwxr-xr-x 2 root root 4096 Aug 12 19:38 . drwxr-xr-x 32 root root 4096 Aug 12 19:33 .. -rw-r--r-- 1 root root 1243 Aug 12 19:38 smb.conf Load smb config files from /etc/samba/smb.conf params.c:OpenConfFile() - Unable to open configuration file "/etc/samba/smb.conf": Success Error loading services. [root][/etc/samba]: testparm /etc/samba/smb.conf Load smb config files from /etc/samba/smb.conf params.c:OpenConfFile() - Unable to open configuration file "/etc/samba/smb.conf": Success Error loading services. [root][/etc/samba]: [root][~]: strace /usr/bin/testparm execve("/usr/bin/testparm", ["/usr/bin/testparm"], [/* 26 vars */]) = 0 uname({sys="Linux", node="maddog1", ...}) = 0 brk(0) = 0x80be148 open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=10769, ...}) = 0 old_mmap(NULL, 10769, PROT_READ, MAP_PRIVATE, 3, 0) = 0x129000 close(3) = 0 open("/lib/libdl.so.2", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340!\0"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=66114, ...}) = 0 old_mmap(NULL, 14072, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x12c000 mprotect(0x12f000, 1784, PROT_NONE) = 0 old_mmap(0x12f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x12f000 close(3) = 0 open("/lib/libnsl.so.1", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0pB\0\000"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=390111, ...}) = 0 old_mmap(NULL, 98304, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x130000 mprotect(0x145000, 12288, PROT_NONE) = 0 old_mmap(0x145000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x14000) = 0x145000 old_mmap(0x146000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) 0x146000 close(3) = 0 open("/lib/libcrypt.so.1", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\22\0\000"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=78762, ...}) = 0 old_mmap(NULL, 187356, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x148000 mprotect(0x14e000, 162780, PROT_NONE) = 0 old_mmap(0x14e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x5000) = 0x14e000 old_mmap(0x14f000, 158684, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) 0x14f000 close(3) = 0 open("/usr/lib/libpopt.so.0", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\23"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=32507, ...}) = 0 old_mmap(NULL, 29820, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x176000 mprotect(0x17d000, 1148, PROT_NONE) = 0 old_mmap(0x17d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x6000) = 0x17d000 close(3) = 0 open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\314\316"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=5077798, ...}) = 0 old_mmap(NULL, 1351940, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x17e000 mprotect(0x2be000, 41220, PROT_NONE) = 0 old_mmap(0x2be000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x13f000) = 0x2be000 old_mmap(0x2c5000, 12548, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) 0x2c5000 close(3) = 0 open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\314\316"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=5077798, ...}) = 0 close(3) = 0 open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\314\316"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=5077798, ...}) = 0 close(3) = 0 open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\314\316"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=5077798, ...}) = 0 close(3) = 0 open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\314\316"..., 1024) = 1024 fstat64(3, {st_mode=S_IFREG|0755, st_size=5077798, ...}) = 0 close(3) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2c9000 mprotect(0x17e000, 1310720, PROT_READ|PROT_WRITE) = 0 mprotect(0x17e000, 1310720, PROT_READ|PROT_EXEC) = 0 munmap(0x129000, 10769) = 0 getpid() = 23563 time(NULL) = 1029254406 brk(0) = 0x80be148 brk(0x80be170) = 0x80be170 brk(0x80bf000) = 0x80bf000 open("/etc/localtime", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=1218, ...}) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x129000 read(3, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0\0\0\2\0"..., 4096) = 1218 close(3) = 0 munmap(0x129000, 4096) = 0 gettimeofday({1029254406, 741487}, NULL) = 0 fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x129000 ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0 write(1, "Load smb config files from /etc/"..., 47Load smb config files from /etc/samba/smb.conf ) = 47 stat64("/etc/samba/smb.conf", {st_mode=S_IFREG|0644, st_size=1243, ...}) = 0 open("/etc/samba/smb.conf", O_RDONLY|O_LARGEFILE) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=1243, ...}) = 0 read(3, "", 0) = 0 close(3) = 0 write(1, "params.c:OpenConfFile() - Unable"..., 83params.c:OpenConfFile() - Unable to open configuration file "/etc/samba/smb.conf": ) = 83 write(1, "\tSuccess\n", 9 Success ) = 9 brk(0x80c0000) = 0x80c0000 write(1, "Error loading services.\n", 24Error loading services. ) = 24 munmap(0x129000, 4096) = 0 _exit(1) = ? [root][~]: __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com