I'm trying to write a script (AppleScript or shell) that connects to a Windows Share and have it use the computer's credentials rather than the user's, i.e. assume the computer name is "workstation1", the user accessing the resource will be "workstation1". The script will execute at Login and Logout. The Mac is bound to the domain.
In Windows, most connections via script will use the security token of the user executing the script if no username is supplied. If the script is executed by the System account, the computer itself is the user. Is there an analog for this on the Mac?
The point of this is to write to a log file, stored on a network share, the user's login/logout times so we have a record of the computer usage.