Re: List of users/accounts
Re: List of users/accounts
- Subject: Re: List of users/accounts
- From: John Fieber <email@hidden>
- Date: Mon, 15 Nov 2004 17:55:55 -0800
On Nov 15, 2004, at 7:05 AM, email@hidden wrote:
You can alos try :
do shell script "niutil -list . /users"
You'll have the complete list of the users available on the machine,
including System accounts.
In panther you would be better off using dscl:
dscl localhost list /Search/Users
This should pick up all accounts the machine knows about regardless of
where the account data are defined...BSD /etc files, netinfo, ldap,
active directory or whatever. niutil will miss some of those.
[footnote: Using dscl you can also learn about how DirectoryServices is
configured, including what data sources have been set up and what the
data source search path is.]
A more AppleScripty way of getting a user list is using System Events:
tell application "System Events"
set userList to users
end tell
But you can't get very much detail about an account compared to dscl.
Listing the files in /Users is not a very good way of determining what
accounts exists.
-john
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden