[Samba] "Special" link folders - Readonly attrib

Dragan Krnic dkrnic at lycos.com
Tue Nov 26 20:53:28 GMT 2002


Hi Everybody,

I've recently installed 2.2.5 on a SuSE 8.1 box and found a 
discrepancy. I've scanned the whole mailing list for the problem but
only found several postings claiming it not resolving it.

In short:
Folder links consisting of a write-protected directory with an SH 
(System, Hidden) "Desktop.ini" and an A (Archive) "target.lnk" don't 
replicate properly in Samba profile. At logoff the Win2K box 
complains that one or the other file could not be saved although the 
real problem is that the folder lost its readonly attrib. After 
loggin in again this magic folder link loses its magic - instead 
of opening directly onto the object linked to it it displays its
trivial contents - the two files I mentioned above. A click on the 
target.lnk causes an Explorer view onto the linked object to be 
opened but it's very different from just seamlessly linking to it.

This Redmondese feature is quite fancy because users can quickly
extend the startup menu by simply dragging-and-dropping a folder onto
the Start icon in the task bar. Surprisingly many users do it for the
sheer hell of it being so easy to do. When they're weaned over to a
Samba server or at least have the tough luck of being administered by
yours truly clueless - well, there's some quiet resentment I can tell.

I've fixed or rather crutched the problem by adding the following line
of heavy-duty explrsh to the logon script:

   for /F "usebacq" %%i in ( `dir /B "%USERPROFILE%\Startmenü\*"`) \
      do @fix-link.cmd "%USERPROFILE%\Startmenü\%%i"

As you can see I'm posting it from a Barbarian territory, so excuse
me if the Umlaut-U doesn't display correctly in your codepage, but you
get the idea, right?

Now the quietly invoked \\%L\netlogon\fix-link.cmd is this kludge:

   %echo off
   dir /A /B %1\Desktop.ini > NULL: 2>&1
   if ERRORLEVEL 1 goto isnt_here
      %windir%\system32\attrib.exe +R %1\Desktop.ini
   :isnt_here

It fixes the problem rather nicely and can also be extended for other
cases like Historials and folder links in Netdom and off-lines but it
is not the real McKoy. The PC sophisticates now cry they can't
copy-drag-drop such a link onto another Samba share and here we go 
again.

I've tried to solve the problem by prepaying 280 euro bucks to the
local SuSE support team to no avail. After sending my smb.conf in I 
received a vanilla share definition right out of "Samba for Dummies".
It migh be a good book but I just don't grok it. So here's the
relevant stanza in my configuration:

      logon path = \\%L\%U\profile
      logon home = \\%L\%U
   [homes]
      valid users = %S
      read only = No
      inherit permissions = Yes
      browseable = No

Can the proverbial kind soul have a look at it and enlighten me as to
what gives?

A flashback:
Upon initial installation on an industry standard Siemens-Fujitsu 
P4/2GHz the system experienced spurious kernel panics frequent enough
to make me reinstall it on a non-descript no-name AMD 1 GHz K7 with
a Tekram 390U2W card and an IBM SCSI disk on the assumption that the
box froze because of flakey IDE DMA in i845 chipset. As it proved 
quite a lot more stable (never a sheesh) I was encouraged to 
recompile the 2.2.6 and, lo and behold! - the readonly attrib 
replicated cleanly on and off the samba share although it was quite a 
biit slooower at logging in and out. I joked that M$ provides the 
magic only when a server is sufficiently inefficient to qualify as a 
true WinNT.

However the joke turned into panic because of excessively long login
and logoff times so I reverted to 2.2.5 only to find out that the 
brake was a stale item in /var/lock/samba/wins.dat. But by then I 
already moved the SCSI components to the Siemens box and loaded 
Service Pack 3 on my workstation. Now neither 2.2.6 nor 2.2.7 does 
the trick. I even tried RedHat 8.0 with the same devastating result.

What did I do wrong?

Is it Win2K SP3?

Is Bill playing the same game with samba as AOL played with his 
messengers?

Does an Athlon-specific bug in gcc 3.2 just happen to understand
properly Luke Casson Leighton Maximus Magnificent's code or what?

Yours truly clueless
Dragan


_____________________________________________________________
Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus



More information about the samba mailing list