Weird problem

Eric Boehm boehm at
Thu Mar 22 00:16:11 GMT 2001

On Wed, Mar 21, 2001 at 05:06:59PM -0600, Holtzclaw, Mark wrote:
>>>>> "Holtzclaw," == Holtzclaw, Mark <mholtzclaw at> writes:

    Mark> I have seen this problem in other posts, but no solution was
    Mark> provided....  Looking for a solution...

    Mark> Samba version: 2.0.7-pre3 Platform: Solaris 2.7

    Mark>  We're getting a very intermittent samba error and I'm
    Mark> wondering if anyone else has come across this - and if so what
    Mark> they did to correct it.  We use samba for Clearcase access,
    Mark> and have it configured to use the smbpasswd file for
    Mark> authentication (we were using the PDC for authentication, but
    Mark> switched to the smbpasswd file to get rid of annoying
    Mark> connection delays ...). Recently, we've started seeing the
    Mark> following errors show up in one of the log files:

    Mark> [2000/04/03 06:04:06, 0]
    Mark> passdb/smbpass.c:startsmbfilepwent(50) startsmbfilepwent:
    Mark> unable to open file /usr/local/samba/private/smbpasswd
    Mark> [2000/04/03 06:04:06, 0]
    Mark> passdb/passdb.c:iterate_getsmbpwnam(149) unable to open smb
    Mark> password database.  [2000/04/03 06:04:06, 1]
    Mark> smbd/password.c:pass_check_smb(505) Couldn't find user
    Mark> 'clearcase_albd' in smb_passwd file.

    Mark>   This happens a dozen times or so, and then ... goes away.
    Mark> Does anyone

    Mark> have any clues as to what might be making the smbpasswd file
    Mark> `unavailable' for short periods?

I have a pretty good idea. I believe you are being bitten by a problem with
fopen and file descriptors > 255. You can have 1014 files open under Solaris
with the stock 2.0.7. However, fopen is used internally to open files like the
smbpasswd file and the machine account file. fopen fails with descriptors >
255. So ... you can have descriptors > 255 and < 1014 which open handles fine
but fopen does not. 

A while back there was a discussion of building Samba with SFIO to address
these problems. Unfortunately, it doesn't solve all the problems. I also
posted a patch to allow you to use more than 1014 files with Solaris and avoid
the need to detune cvpfreemax and vobfreemax on Windows NT clients. The best
solution seemed to be to compile Samba as a 64bit application which gives open
and fopen 65535 file descriptors.

I have been using such a configuration at several sites, in production, since
January 25. For more details, you can read

For the postings to cciug at

You can go to and search the samba lists for
rlim_fd_max. Look at the posts from 2001-01-24 to 2001-02-02. They were posted
to samba, samba-ntdom and samba-technical.

Eric M. Boehm                               boehm at

More information about the samba mailing list