• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Write defaults
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Write defaults


  • Subject: Re: Write defaults
  • From: Axel Luttgens <email@hidden>
  • Date: Fri, 09 Mar 2007 22:53:25 +0100

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
  • Follow-Ups:
    • SV: Write defaults
      • From: <email@hidden>
References: 
 >Write defaults (From: Gunno Ivansson <email@hidden>)

  • Prev by Date: RE: Global variables
  • Next by Date: Re: how to do a proper alphabetical sort?
  • Previous by thread: Write defaults
  • Next by thread: SV: Write defaults
  • Index(es):
    • Date
    • Thread