Login Hook question/problem

Hello Everyone-

I have a problem with a login hook using Network Based Home Directories. Here is the situation:

User Bob logs into his client machine as “Bob” which has a home folder that is on a XServe. Upon login I have setup a login hook that runs a script(AppleScript) to try to copy a plist to Bob’s home folderFrom the Xserve. Problem is that when the login hook runs it is root, not Bob so the script doesn’t know where Bobs home folder is located until Bob is fully logged in. It finds root’s home folder and copies the file there, not good, Bob still doesn’t have the file.

I have been able to get it to work making the script run from the login items system preference panel, but this is not the preferred method as I don’t want the users to “see” the file transfer happen.

Is there a way to find out that “Bob” logged in, and still have the log in hook run as root? Does that make sense? If you need more info let me know. Thanks


Note: This post is a few educated guesses since I don’t know exactly what you are referring to. What exactly is a login hook?

If it is something in the rc files (I don’t know how login hooks work) then using su to run a command as the user that is logging in would be the preferred method.