Changed short name to contain capitols and spaces... is this bad?

Posted:
in Genius Bar edited January 2014
About a week ago I changed my short name from 'timdeneau' to 'Tim Deneau' just to see if it would work. I went through NetInfo Manager and changed the proper entries, moved my files, deleted the old account, reconfigured a few preferences, etc. Everything has been acting normal so I can't figure out why the system would specifically want names in the previous format. Can I damage something by doing this?

Comments

  • Reply 1 of 5
    karrickkarrick Posts: 17member
    Rojo-



    Perhaps the best thing to do in this situation is to not change a user's short name on Mac OS X. This could cause some problems down the road that you haven't anticipated.



    Instead, to test your theories, I would recemmend creating a new account with the desired shortname, use it for a while to determine if all the standard features work, and perhaps then migrate your user settings to the new account.



    A short name is not for your viewing pleasure, but for your computer's BSD-like core to use for operating system-related needs. The basic recommendation is to choose a simple shortname that is unique to distinguish your account from any other account, while staying away from the weird account names. Weird account names have other characters in them, such as spaces, special symbols, etc.



    The damage that funky account names cause is dependent upon what BSD-like software must access your account's short name. If the software is programmed with those funky characters in mind, then that utility will not cause problems. Unfortunately most of these BSD-like system utilities are designed to work with standard UNIX account names with no funky characters, and many of these may fail when they encounter your funky account name.



    I hope this is informative,

    Karrick
  • Reply 2 of 5
    karl kuehnkarl kuehn Posts: 756member
    The capitols probably won't be a problem for most local software, but you might have some problems logging into some services that might to a tolower() on what they are passed (since user-names are typically case-insensitive).



    The real problem is going to be scripts you might run, as they will choking in bad ways on the space in the name.



    In general I think that it was a bad idea to go randomly messing with internals on an OS if you don't know the results. And doing so "just because" really worries me.
  • Reply 3 of 5
    Well, I've tested all the standard apps and utilities without encountering errors. I installed a few third-party apps and also did some simple maintenance through terminal without problems.



    But no, it isn't worth it to just wait and see if something will break, so I changed it back to be safe. Interesting to see what happened though.
  • Reply 4 of 5
    As you were probably aware, the Mac OS X is developed on a fully loaded and functional and loaded BSD unix platform. Like a lot of the internet, the syntax of unix does not readily accept spaces well at all. There are imoprtant reasons for defaullting to this behavior in our ways because we never know what box or version of Unix Linux or whatever we will be talking to, and things differ with versions. Versions of platforms, OS or software... Take a url, a universal resource locator. It is a name for something that is really just a series of folders and files nested in a unix box or linux or mac or sun Or... So, for instance right here you have hypertext protocall, the forums folder at appleinsider.com, and into the newreply folder with some php addressing that says where this reply goes as I write this. It is basically has it's roots in a unix file address in the basic form. If I add a space to the url though and the address will no longer work.



    Often if we want a space we substitute wth an underscore, the shifted dash... (_) this places a character that to us means space but to the unix and it's age old syntax means underscore and not nothing at all. Unix depending on the age or coding will stop reading a line when it hits a space, but sometimes not. To be safe always, it is best that we just give to the OS what belongs to the OS, Follow it's rules and heirarchies and play the game it's way. Lowercase and no spaces is always a pretty sure bet.
  • Reply 5 of 5
    toweltowel Posts: 1,479member
    More pointedly, whitespace is often used to separate commands in UNIX-land. I'm curious what would happen if you went to the Terminal and tried "chown Tim Deneau somefile.txt". I suspect that chown would try to make the file Deneau owned by user Tim, and would choke when it discovered that there was no file named Deneau. When the OS or an application calls chown, it might be smart enough to scan the username for whitespace and "sanitize" it before handing it to chown...or it might not. Same with just about every UNIX app and utility. Bottom line is that you're playing with fire, and counting on every programmer who's ever had anything to do with any line of code on your system to have had the foresight to anticipate that a user might go against all conventions and put whitespace in their username.
Sign In or Register to comment.