Looking for something like a logon script

Robert Dahlem Robert.Dahlem at frankfurt.netsurf.de
Fri Dec 18 17:13:14 GMT 1998


Phil,

On Fri, 18 Dec 1998 10:30:57 +1100, Phil Cox wrote:

>Requirements: When a user connects/authenticates to a Samba server a pop-up
>window with the users last connect/authentication time to that resource is
>displayed on the Windows NT workstation (It will be either NT WS or
>smbclient).

For NT WS this seems to be nothing more than just a little shell programming:

Configure a "(root) preexec" for each share (or do it global) which runs a script. 
The script should do the following: 

- First check the output of "samba status" if there is already a connection
  from this IP address (pass %I to the script). If yes: terminate.
- Get the users last connect time from some local database (user name is in %U)
- Store the user and current time into the same local database as new last connect
  time
- Send him a popup message with something like
    echo "Your last connect time was $last" | /your_path/smbclient -M $machine
  ($last is from the local database und $machine is from %m)

With smbclient connects this seems to be a little more complicated since you have 
nothing like a useful netbios name of the client machine. Perhaps someone else 
spins anything around this.

Hasta la vista,
               Robert

-- 
---------------------------------------------------------------
Robert.Dahlem at frankfurt.netsurf.de
Radio Bornheim - 2:2461/332 at fidonet +49-69-4930830  (ZyX, V34)
                 2:2461/326 at fidonet +49-69-94414444 (ISDN X.75)
---------------------------------------------------------------



More information about the samba mailing list