• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Owner/User Name in OSX
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Owner/User Name in OSX (From: Simon Topliss <email@hidden>)
 >Re: Owner/User Name in OSX (From: garbanzito <email@hidden>)

  • Prev by Date: Re: Beep broken in 10.1.4?
  • Next by Date: Re: Referencing a folder with "~" in the name
  • Previous by thread: Re: Owner/User Name in OSX
  • Next by thread: Re: Owner/User Name in OSX
  • Index(es):
    • Date
    • Thread