Re: Owner/User Name in OSX
Re: Owner/User Name in OSX
- Subject: Re: Owner/User Name in OSX
- From: John W Baxter <email@hidden>
- Date: Wed, 24 Apr 2002 18:31:19 -0700
At 10:41 -0600 4/24/2002, garbanzito wrote:
>
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.
Very nice. (So far, I've managed to avoid niutil...for 13 months as of today.)
I suspect there is more to that "unless"...at least, if I try to create a
long name of Sam B the suggested short name is samb; if I try to create a
long name of John & Mary Jones the suggested short name is johnmary. [Both
in the Users pane of System Preferences.]
I wouldn't expect FreeBSD to like anything other than letters, digits or _
in the short name. (But I could easily be wrong, although some
experimentation went into that.)) I was a little surprised to see the
Users pane accept a leading digit as part of the short name.
--John
--
John Baxter email@hidden Port Ludlow, WA, USA
_______________________________________________
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.