Tiny Deathstars of Foulness

When connecting to a server from Mac OS X, what name will your system use when you bring up the Connect to Server dialog box? By default it shows the full name of the user authenticated to a client computer. But, not everyone wants this behavior. Therefore, you can change it by altering the /Library/Preferences/ file. The first thing you can do is add a key called UseDefaultName, which will tell the system to use a static value to populate the user field. That static value is then put into a string for Default Name. To make the UseDefaultName field true:
defaults write /Library/Preferences/ UseDefaultName -bool YES
To then set the string for that default name field:
defaults write /Library/Preferences/ DefaultName “Charles”
Or if you wanted nothing to default into the field, you’d leave it static but give it nothing to put into the field (you do still need the key there though, so don’t skip this step):
defaults write /Library/Preferences/ DefaultName “”
To have the field populated with the short name instead of long name, you would change UseDefaultName back to NO (after all, it isn’t a static setting, the short name):
defaults write /Library/Preferences/ UseDefaultName -bool NO
And you would then add a key for UseShortName and set it to true:
defaults write /Library/Preferences/com.ap ple.NetworkAuthorization UseShortName -bool YES
Or, if you wanted to To change everything back, just delete the keys we created earlier:
defaults delete /Library/Preferences/ UseDefaultName
defaults delete /Library/Preferences/ UseShortName
defaults delete /Library/Preferences/ DefaultName

August 27th, 2010

Posted In: Mac OS X, Mac OS X Server, Mass Deployment

  • DB

    Ahhhh I see…..I was trying to force OS X to always use the shortname instead of Display Name when connected to Active Directory. I didn’t catch you had to run both commands. Makes sense now. Did both and seem to be working the way I want now! Thanks!

    I only ran:
    defaults write /Library/Preferences/com.ap
    ple.NetworkAuthorization UseShortName -bool YES

    Also need to run this cmd as well:
    defaults write /Library/Preferences/ UseDefaultName -bool NO

  • DB

    Well its not working the way I thought….I thought it was working when you come back and your screensaver is on. I still have the same issue. In 10.5.8 I have the keychain lock icon in the menu bar and users can go up and lock the screen when they step away. When they come back they are presented with a login window and the username is always the display name from Active Directory. I want it to be the users username. Know of any way to force that to shortusername?

    • I don’t know of a way to do that specifically. I would think it would actually be controlled somewhere in if there is a way to do it. This is mostly just for the “Connect to Server” dialog box. I’ll tinker around with it when I get a chance and let you know if I come up with anything.

  • ivonesh


    Is it possible to default to a blank dialog box with the cursor in the Name box?

    If I use the command defaults write /Library/Preferences/ DefaultName “”

    It fills the name box with “” and drops me at the password entry.

    If I take out the “” in the terminal command it will accept it.


    • Sorry about that. You can

  • ivonesh

    Using ” instead of “” will make it blank.