Hmm..... Let's try do another thing, see if it make any differenece....
Try adding the following lines to the original script.
Those lines should come after the line with the 'umount -f' command (meaning those new lines will be lines 4-6)
do shell script "echo $'dscacheutil -flushcache' >> /Users/logouthook" withadministrator privileges
do shell script "echo $'networksetup -setnetworkserviceenabled Ethernet off' >> /Users/logouthook" withadministrator privileges
do shell script "echo $'networksetup -setnetworkserviceenabled Ethernet on' >> /Users/logouthook" withadministrator privileges
The first line clears the dns cache
The second and third lines are just turning the Ethernet off and then on again
Note that the second and third line will only work if the connection in System Preferences->Network actually called Ethernet.
If it's not, just change the name accordingly, this is case-sensitive.
For example, I'm using Macbook Pro without ethernet port, so under Network preferences I have USB Ethernet,
So for the above code to work I need to write it like this:
do shell script "echo $'networksetup -setnetworkserviceenabled USB\ Ethernet off' >> /Users/logouthook" withadministrator privileges
(I've used a backslash, if you remember our talk about spaces)
Again,
I would suggest copy-paste the whole code to AppleScript Editor on a clients computer, and run it (before saving it as Application) to see that it runs without problems.
And Hector, just for the sake of checking,
Would you mind trying to log in as network user A, then network user B, then network user A again,
But this time, try using network users who have different mail providers (for example, network user A have gmail account and network user B have yahoo account).
I want to see if it has anything to do with the fact that both are using the same mail provider.
Cheers.