Win95 profiles on server (was Re: Automated installs (very long))

Louis Mandelstam lma at
Wed Oct 8 13:42:43 GMT 1997

On Wed, 8 Oct 1997, Louis Mandelstam wrote:

> The logon script then imports this .reg file, and by the time Win95 checks
> for profiles, it finds it already has an entry for the user, and the
> location of the user's profile is in his/her home directory on the server
> (someone, I think Gerald, asked about whether this can be a UNC path -
> seems to work here)
> One problem I have with this setup is that there is a race condition - we
> assume the preexec script has completed by the time the Win95 machine
> reaches that point in the logon script.   I plan to implement some kind of
> mechanism to cause the logon script to wait (or eventually time out) 
> today.

Looks like I was mistaken - there is no race condition as described.

It would seem that the Win95 login routine doesn't start until after the
preexec script has completed.  Presumed that the two processes would
happen in parallel and that it was just a case of the server process being
much quicker causing the .REG to be ready by the time the login script
expects it.

I'd tried adding sleeps up to 30 seconds in the preexec script, and the
client patiently waits for the delayed preexec script to complete before
it continues.

Are my assumptions correct?

If yes, the only locking problem I need to worry about is when the same
username tries to log in at two client stations at the same time - it
could be possible that the one instance's preexec process could trample on
the other's.

Since I don't want this to happen at all anyway (multiple concurrent
sessions for the same user) I'd like to ask for hints on preventing this.

My home directories, which all the users connect to, and a connection to
which I consider a "login" (I even log connects/disconnects to this share
to wtmp/utmp) are set up as follows:

   comment = Your home directory
   path = /home/%u   
   browseable = yes
   read only = no
   create mask = 0770
   root preexec = /usr/bin/sessreg -a -l smb%d -h %m %u
   root postexec = /usr/bin/sessreg -d -l smb%d -h %m %u

Note I'm not using the [homes] share - the above gives me the advantage of
a fixed share name always being the current user's home directory, so I
can hardcode applications to look for things there.

Problem is I don't see how I could use something like 'max connections =
1' since that wouldn't limit me to one user at a time, not one instance of
each username at a time, correct?

Ideally, I'd like an error message to come up when an already-logged-in
user tries to login from another machine, and for the login process to
abort back to the login dialog box.

Looking forward to comments.



Louis Mandelstam              Tel +27 83 227-0712   Symphony  /|\   /|\
Linux systems integration       Research {   } {   }
Johannesburg, South Africa    mailto:louis at (Pty)Ltd {___} {___}

More information about the samba mailing list