Re: getting users
Re: getting users
- Subject: Re: getting users
- From: Graff <email@hidden>
- Date: Mon, 12 Jan 2004 22:33:51 -0500
Here are two ways to do it on Mac OS X, depending on how in-depth you
want to get.
If you are just wondering about people who have local home directories
then this is an easy way:
set theList to do shell script "ls -1 /Users/ | awk '{ if ( $1 !=
\"Shared\") print }'"
set userList to every paragraph of theList
If you want to know every account, even those who do not have a local
home directory then you can do this. The problem with this method is
that you get EVERY account registered with the system, even those which
may not actually be people! Some accounts are created in order to
provide a safe way for programs to operate with limited privileges:
set theList to do shell script "niutil -list . /users | awk '{
print $2 }'"
set userList to every paragraph of theList
- Ken
On Jan 12, 2004, at 6:36 PM, Martha Espinosa wrote:
Is there a way to use applescript to find out who has an account on a
machine...
Thanks In Advance..
_______________________________________________
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.
References: | |
| >getting users (From: Martha Espinosa <email@hidden>) |