1

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.

1

You're going to have to dig up the client computer's domain trust password to access resources as the computer account. Not having much Mac OS X experience I'm not able to tell you where that's stored, unfortuantely.

When you perform the "bind" a random password is created that's used for the password for the computer object in AD. Windows clients will periodically reset that password (by default), but I'm unsure if Mac OS X has that functionality. Ideally, whatever you code would just go fetch that secret every time it ran.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.