SV: Write defaults
SV: Write defaults
- Subject: SV: Write defaults
- From: <email@hidden>
- Date: Sat, 10 Mar 2007 09:40:24 +0100
- Thread-topic: Write defaults
Axel,
After reading the man page once more I learned that you can set a path to a plist file, omitting the .plist extension.
The reason I try this is that the osascript LogoutHook stopped working on my G5 box. I don't know why, it still works on my Intel MacBook.
Thanks
Gunno I
-----Ursprungligt meddelande-----
Från: applescript-users-bounces+gunno.ivansson=email@hidden genom Axel Luttgens
Skickat: fr 2007-03-09 22:53
Till: AppleScript Users
Ämne: Re: Write defaults
On 9/03/07 18:51, Gunno Ivansson wrote:
> Hi,
>
> I am testing a logouthook which is writing to the defaults. It works fine
> running from the terminal but won't work at logout as logouthooks are
> run as
> root.
> Is there any way to write to an other users defaults? (eg from root to my
> user). I tried putting an alias of the plist in the roots preferences but
> that didn't do the trick. The strange thing is that logged in as root
> I can
> read from this plist file but not set any values.
In a default install of Mac OS X, the root user may "su" or "sudo"
without even have to provide a password.
For example, you could try something like this:
sudo -u someuser defaults write ...
where "someuser" is the user you want to act upon at logout.
Again, double-check and try with harmless things first... ;-)
HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden