Samba caching directory handles? (Writes to incorrect home dir)

Andrew Bartlett abartlet at pcug.org.au
Tue May 15 12:01:52 GMT 2001


James Sutherland wrote:
> 
> On Tue, 15 May 2001, Andrew Bartlett wrote:
> 
> > What I am wondering is if samba does any caching of directory handles or
> > the like, and whether samba could be mis-translating //servername/homes
> > to the wrong user, using the directory from a previous user.  Is this at
> > all possible?
> 
> IIRC, Windows does this: when a new user logs on, it finds a cached
> "\\servername\homes" connection, and continues to use that. ISTR there's a
> caveat about this in the docs - something along the lines of "don't use
> \\servername\home for a home directory mapped to /home/%U because Windows
> will cache the first user's \\server\home and reuse it for the next user"?

In this case the connection (session setup) is over, as the utmp support
shows that the vuid has been invalidated, and the user logged out.  So
its probably not this.

> 
> Can you switch to something like \\server\home\username as the home
> directory? This will be a nuisance for users - everything becomes
> "H:\username" instead of "H:\" - but at least their home directories will
> be private again! Alternatively, perhaps you could use \\server\username -
> so each user has a different sharename for their home directory?
> 
> James.

Note that this is not a 'domain logon', its a normal file-share
connction, and the drive is successfuly un-mapped when the user hits the
'disconnect' button on our logon applet.

Note also that there are no errors being reported, just mysteriously
appering files.  What I am wondering is if somthing is keeping the
directory open, and if samba is then accidently pulling this out of the
'cache', and creating a new file in it.

All the home directories are mod 0700, as a matter of note.

Also, changing how this works is not an option - we have a fairly large
number of users, and this is how they expect it to work.  We have them
trained...

Thanks,
Andrew Bartlett

-- 
Andrew Bartlett
abartlet at pcug.org.au




More information about the samba-technical mailing list