Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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