• 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
Root User
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Root User


  • Subject: Root User
  • From: Luther Fuller <email@hidden>
  • Date: Wed, 26 Mar 2014 16:20:24 -0500

I need to determine if the current user is 'root'.
Perhaps I could use something as simple as ...

tell application "System Events"
name of current user --> "root"
end tell

But ... Can there be a root user with a name other than "root" ?

If so, then perhaps I should use this handler ...

on rootUser()
tell application "System Events" to home directory of current user as alias
tell application "Finder" to container of the result as alias as text
return (the result ends with ":private:var:")
end rootUser ---------------

Anyone know the answer to this ?



 _______________________________________________
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:
    • Re: Root User
      • From: Luther Fuller <email@hidden>
    • Re: Root User
      • From: Luther Fuller <email@hidden>
    • Re: Root User
      • From: Luther Fuller <email@hidden>
    • Re: Root User
      • From: Ron Hunsinger <email@hidden>
  • Prev by Date: Re: Some line breaks aren't showing up when I try and make a list of paragraphs of email contents
  • Next by Date: Re: Root User
  • Previous by thread: Re: Some line breaks aren't showing up when I try and make a list of paragraphs of email contents
  • Next by thread: Re: Root User
  • Index(es):
    • Date
    • Thread