Running an apple script as the logged in user through Self service

Kedgar
Contributor

I want to publish some scripts for changing Entourage settings in Self
Service. I have found though they do not work properly because they are
being run as root rather than the logged in user. I have not pushed
something before and had it run as the user... I think I should use the $3
variable... but not sure if it should be in my script, or in the policy for
Self Service.

Any help is appreciated... thank you,
Ken

1 REPLY 1

ernstcs
Contributor III

Only policies triggered by Login or Logout hooks will utilize the current user information in $3 I’m thinking.

Aside from that you would need to actually get the currently logged on user another way if you’re trying to manipulate information in that Users home directory.

ls -l /dev/console | awk '{ print $3}

Hopefully I’m not misunderstanding what you are trying to do.

Craig E