Lorenzo Corradini
2000-Oct-25 17:34 UTC
Ogg.: Re: How to hide shares for users that have no rights
Well, it works! The %U and %G are set at the time the config file is read. As you can read at page 337 in the book by Eckstein, Collier-Brown and Kelly (Using Samba) the variables that are not set at the time the smb.conf file is read are %u, %P and %S. Lorenzo. Il Wed, 25 October 2000, Glenn MacGregor ha scritto:> > I am not sure that will work. At the time the config file is read those two meta > vars are not set. I may be wrong but that is what I understood. > > Glenn > > Giulio Orsero wrote: > > > On 25 Oct 2000 12:53:17 +0000, you wrote: > > > > > *) I have created, for example, 10 shares and I can access only 4 of them > > > (I have rights to read or write only for 4 shares). > > > Well, is it possible to hide to my browsing the 6 shares that I can not > > > access. I need to obtain an effect like the one I have for the Home share. > > > Each user can only see its own home directory and not the home directories > > > > Consider using something like > > > > include = /path/smb.conf.%U > > include = /path/smb.conf.%G > > > > and in /path/smb.conf.UserA put shares for UserA only > > ... > > and in /path/smb.conf.GroupA put shares for GroupA only > > ... > > > > -- > > giulioo@pobox.com > > -- > > Glenn MacGregor > > Director of Services > Oracom, Inc. > http://www.oracom.com > > Tel. +1 978.557.5710 Ext. 302 > Fax +1 978.557.5716___________________________________________________ Se vuoi un indirizzo di posta elettronica gratuito, iscriviti a http://www.katamail.com
Be very careful here. We found that the various variable are returned by the different versions of windoze at different times. For example Windows 98/2E and Windows ME (effectively the same) returned the %u (lowercase) regularly while Windows 2000 Server DOESSN'T... Likewise, %U is not returned by both 98/ME and W2000Server in such a way that includes's can receive it. Don't rely on WindowsME to get things right either... If you rely on Machine type (%a) WindozeME returns Win95!!! (this may be a samba(2.07)) excuse but still. Easy way to check your system [home] ; comment Home directory for %u comment (a)%a (u)%u (U)%U (m)%M (I)%I ... works really well. Look for the "detail" in the share listings. Bruce> Well, it works! The %U and %G are set at the time the config file is read. > As you can read at page 337 in the book by Eckstein, Collier-Brown and > Kelly (Using Samba) the variables that are not set at the time the smb.conf > file is read are %u, %P and %S. > > Lorenzo. > >Il Wed, 25 October 2000, Glenn MacGregor ha scritto: > >> >> I am not sure that will work. At the time the config file is read those >>two meta >> vars are not set. I may be wrong but that is what I understood. >> >> Glenn >> >> Giulio Orsero wrote: >> >> > On 25 Oct 2000 12:53:17 +0000, you wrote: >> > >> > > *) I have created, for example, 10 shares and I can access only 4 of >>them >> > > (I have rights to read or write only for 4 shares). >> > > Well, is it possible to hide to my browsing the 6 shares that I >>can not >> > > access. I need to obtain an effect like the one I have for the >>Home share. >> > > Each user can only see its own home directory and not the home >>directories >> > >> > Consider using something like >> > >> > include = /path/smb.conf.%U >> > include = /path/smb.conf.%G >> > >> > and in /path/smb.conf.UserA put shares for UserA only >> > ... >> > and in /path/smb.conf.GroupA put shares for GroupA only >> > ... >> > >> > -- >> > giulioo@pobox.com >> >> -- >> >> Glenn MacGregor >> >> Director of Services >> Oracom, Inc. >> http://www.oracom.com >> >> Tel. +1 978.557.5710 Ext. 302 >> Fax +1 978.557.5716 > >___________________________________________________ >Se vuoi un indirizzo di posta elettronica gratuito, >iscriviti a http://www.katamail.com