[Samba] Re: smbstatus - switched off computers are sometimes showed

Vlastimil Šetka setka at spsostrov.cz
Fri Sep 19 23:31:48 GMT 2008


Avery Payne wrote:
> Vlastimil Šetka wrote:
>   
>> Sometimes (cca twice a day) smbstatus return error output like this:
>>  tdb(/var/run/samba/sessionid.tdb): rec_read bad magic 0xd9fee666 at
>> offset=116988
>>     
> It looks like you have an issue with a record. Stop your service for a
> moment, go in and cp your files in /var/run/samba to a new directory,
> say to /var/run/samba.backup, then go into /var/run/samba and do this:
>
> tdbbackup -sbak *.tdb
> tdbbackup -v -sbak
>
> ...then start Samba.  The first makes a backup of your tdb tables; the
> second verifies (and restores if needed) your tdb records.  This is
> safe, but if there was any issue, you can always restore your files from
> the copy in /var/run/samba.backup that you made.
>   
At first: I get this error message only about twice a day (smbstatus is 
executed every 10 seconds) and the "offset" number every time changes. 
But the issue with a "ghost" user is more frequent.
I read the source of smbstatus and I think that delete 
/var/run/samba/sessionid.tdb will be enough. In my tool I use "smbstatus 
-p" and in this case any other file is not used.
I already tried to stop samba, delete this file and then start samba. 
New empty sessionid.tdb was created but nothing changes.
Maybe I will try your advice about delete and backup all tdb files but I 
have to wait for some time for testing when the system is not in use.
>> It's a bug or a feature and smbstatus is only informative? It's solved
>> in some newer version? Can you tell me about better source for connected
>> user status?
>>     
> On RHEL52 here and just moved up to 3.0.28 as part of an update from
> stock RHEL50.  Significant difference in stability and behavior from the
> stock 3.0.25b.  Twice-a-week locking issues have just "disappeared" and
> using the Computer Management tool attached to the Samba server shows
> actual files open instead of "ghost files".
>
> Does "apt-get update && apt-get upgrade" show any entries for Samba?
>   
The package is up-to-date Etch version.


More information about the samba mailing list