Re: getting users
Re: getting users
- Subject: Re: getting users
- From: "John C. Welch" <email@hidden>
- Date: Mon, 12 Jan 2004 21:15:49 -0600
On 1/12/04 5:36 PM, "Martha Espinosa" <email@hidden> wrote:
>
Is there a way to use applescript to find out who has an account on a
>
machine...
>
>
Thanks In Advance..
Under panther or Jaguar?
Under panther, it's simple:
tell application "System Events"
set theUsers to every user
end tell
Now the big problem with that is you're going to get users that don't log
in, like www, and others. If you want non-root users, then you can use:
tell application "System Events"
set theUsers to every user whose home directory contains "/Users/"
end tell
If you have your home directories somewhere else, then it gets trickier. One
way is to exclude users whose home directory contains /var, /private, or
/Library
john
--
"Full plate and packing steel!"
Baldur's Gate
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.