Re: Owner/User Name in OSX
Re: Owner/User Name in OSX
- Subject: Re: Owner/User Name in OSX
- From: garbanzito <email@hidden>
- Date: Wed, 24 Apr 2002 10:41:33 -0600
at 2002 04 24, 15:00 +0100, they whom i call Simon Topliss wrote:
How do I get the current owner/user name in OSX? I need the long version,
not just the path to the user's home.
try this:
set short_name to do shell script "whoami"
set long_name to do shell script "niutil -readprop . /users/" &
short_name & " realname"
display dialog short_name & " (" & long_name & ")"
the two names will be the same unless the long name has more
than 8 characters.
--
steve harley email@hidden
_______________________________________________
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.