[Samba] VFS recycle & force user

Jeremy Allison jra at samba.org
Thu Jul 9 23:34:49 GMT 2009


On Tue, Jul 07, 2009 at 03:47:31PM +0200, deseyve at linuxbox.cz wrote:

> i have problem with share with parametr "force user"
> 
> Here i my settings of VFS modul recycle
> 
> vfs object = recycle
>                 recycle:repository = .recycle/%u
>                 recycle:maxsize = 50000000
>                 recycle:exclude = *.tmp *.temp *.o *.obj ~$*
>                 recycle:exclude_dir = sdileni/*/profile* tmp temp cache
>                 recycle:versions = yes
>                 recycle:touch = yes
>                 recycle:keeptree = yes
> 
> and this is my share
> 
> [my_share]
>         path = /home/sdileni/instalace
>         comment = software, instalace
>         force group = smbgroup
>         force user = smbuser
>         public = yes
> 
> 
> If i delete some file from this share, then samba make
> directory .recycle/smbuser. But in older version (for example Samba 3.3.0)
> samba maked directory .recycle/real_user - and this i need! It's possible?
> I must have something new in configuration or is this new behavior of
> samba?

I think this is a side effect of the change that went
into 3.4.0pre1. From the changelog :

Changes since 3.4.0pre1
-----------------------

o   Jeremy Allison
    * BUG 6291: Fix 'force user'.

The recycle code uses a substitution of conn->server_info->unix_name
for the "%u" parameter, and this is not (correctly) set to the
forced username on connect (which is required for "force user"
to work correctly.

The real user name is lost after authentication, which is what
you've asked for. The previous (3.3.0) behavior was probably a
side effect of force user not being correct in that release.

I think in the latest Samba 3.3.6 it would behave the same.

Jeremy.


More information about the samba mailing list