9 Replies Latest reply: Jun 27, 2013 11:51 AM by deivy
morriszcat Level 1 Level 1 (0 points)

Hi everyone. I've come across a very weird situation which hopefully someone else here can help me fix.

 

My organization uses AD (mixed environment of Windows and Macs). Upon signing into an account for the first time on a Mac, we create mobile accounts (this is a requirement). This specific user's last name is Key. Let's call her Jane Key.

Her username is jane.key. She's been in the company for a while and just got upgraded from 10.6.8 to 10.8.4

As soon as this happened, her home folder is being shown as a Keynote File; specifically, in the "file kind" portion when looking at it through "get info"

I've logged her into other macs, and the problems occur: random errors, such as Universal Type Client not responding, and Dropbox never starts up. Sometimes, it looks like she has logged into a temporary account, since none of her items fon her Desktop or Dock show up. It also forces a synch of her User folder to the server, which is not neccessary for the Mac users, even after scheduling a synch to "manual", it automatically forces the synch.

 

Any idea how I could change her /Users/Jane.Key directory from  being seen as a keynote file, to a directory, the way it's supposed to be? I've thought of changing her home folder name to something else, but I'm not sure how that would affect her login using A.D credentials, and network shares. Thanks!


OS X Mountain Lion (10.8.3)
  • 1. Re: User's last name matches keynote file extension. Her account on the Mac now has random problems.
    cpragman Level 2 Level 2 (445 points)

    I thought I read somewhere that OS X does weird things when periods are in useraccount names.  Could be related, maybe not.  google it.

  • 2. Re: User's last name matches keynote file extension. Her account on the Mac now has random problems.
    deivy Level 4 Level 4 (2,365 points)

    morriscat, I am sorry if I find the problem funny. 

     

    Also, I think the idea of having a "." in the middle of the login userid is not exactly a very well thoughtout one.

    Nevertheless, I don't if it will work, but did you try navigating to "jane.key" home folder and use the "get info for" window in the "Finder" to make sure the system understands this folder as a  home folder?

  • 3. Re: User's last name matches keynote file extension. Her account on the Mac now has random problems.
    morriszcat Level 1 Level 1 (0 points)

    Yes, even the user found it funny. Unfortunately having the "." in the middle of the name is the naming convention used for user names in my company. It's been like that forever since it's a mostly Windows environment.

     

    When logged in as the user, the /Users/jane.key does display the home icon, so the system knows it's the home directory. When using the Column view in Finder, it does not show anything in the proceding column, like when you normally click a directory? When logged in as someone else, the user's home directory turns into a blank icon, and cannot be open, except by right clicking and choosing "Show Package Contents".

     

    I know there are ways to set filetypes to open with other programs, but I was hoping there was a way to change the "File Kind", so the system recognizes that it is a directory, and not a Keynote file.. I'm pretty sure that is why the problems are happening that I mentioned in the first post.

  • 4. Re: User's last name matches keynote file extension. Her account on the Mac now has random problems.
    deivy Level 4 Level 4 (2,365 points)

    First apologies for forgetting the "z" morriszcat....

    Now, I am really not sure but we may try something.

    Open AppleScript editor and run the following script from "Jane"'s account and then from a different account just to see what you get.

    This is the script:

    <script>

    tell application "System Events"

              set l to POSIX file "/Users/jane.key/"

              set l1 to l as alias

              return properties of l1

    end tell

    </script>


    I think  the key is this: 

                                           type identifier:"dyn.age8u"

     

    If you don't mind, post the output of the command, omitting everything that should be omitted here.

    We'll go from thare.


  • 5. Re: User's last name matches keynote file extension. Her account on the Mac now has random problems.
    morriszcat Level 1 Level 1 (0 points)

    Hi Deivy,

     

    Here is the output, both as myself, and on the user's account

     

    As Myself:

    {short version:"", container:folder "COMPUTERNAME:Users:" of application "System Events", path:"COMPUTERNAME:Users:jane.key:", file type:"BNDL", volume:"COMPUTERNAME", physical size:missing value, URL:"file://localhost/Users/jane.key/", id:"jane.key,-100,4059987", displayed name:"jane.key", busy status:false, kind:"Keynote Document", creator type:"????", version:"", name extension:"key", POSIX path:"/Users/jane.key", name:"jane.key", modification date:date "Wednesday, June 19, 2013 12:53:44 PM", size:missing value, class:alias, type identifier:"com.apple.iwork.keynote.sffkey", package folder:true, stationery:false, creation date:date "Wednesday, June 19, 2013 12:42:01 PM", default application:alias "COMPUTERNAME:Applications:Preview.app:" of application "System Events", visible:true, product version:""}

     

    Then as her:

    {short version:"", container:folder "COMPUTERNAME:Users:" of application "System Events", path:"COMPUTERNAME:Users:jane.key:", file type:"BNDL", volume:"COMPUTERNAME", physical size:missing value, URL:"file://localhost/Users/jane.key/", id:"jane.key,-100,4059987", displayed name:"jane.key", busy status:false, kind:"Keynote Document", creator type:"????", version:"", name extension:"key", POSIX path:"/Users/jane.key", name:"jane.key", modification date:date "Wednesday, June 19, 2013 12:53:44 PM", size:missing value, class:alias, type identifier:"com.apple.iwork.keynote.sffkey", package folder:true, stationery:false, creation date:date "Wednesday, June 19, 2013 12:42:01 PM", default application:alias "COMPUTERNAME:Applications:Preview.app:" of application "System Events", visible:true, product version:""}

     

    I am testing this from my computer, so I just recreated her profile from scratch (as i said before, this happens on any 10.8 Mac in our organization). Thanks for checking this out!

  • 6. Re: User's last name matches keynote file extension. Her account on the Mac now has random problems.
    deivy Level 4 Level 4 (2,365 points)

    Morris,

    I see the problem. Here is the output run from my computer of my home folder:

     

    {short version:"", container:folder "HD:Users:" of application "System Events", path:"HD:Users:deivy:", file type:missing value, volume:"HD", physical size:missing value, URL:"file://localhost/Users/deivy/", id:"deivy,-100,380399", displayed name:"deivy", busy status:false, kind:"Folder", creator type:missing value, version:"", name extension:"", POSIX path:"/Users/deivy", name:"deivy", modification date:date "Monday, June 10, 2013 7:41:47 PM", size:missing value, class:alias, type identifier:"dyn.age8u", package folder:false, stationery:false, creation date:date "Monday, September 17, 2012 6:59:07 PM", default application:alias "HD:System:Library:CoreServices:Finder.app:"

                      of application "System Events",  visible:true, product version:""}

     

     

    I underlined the differences, but I put them below so you can see what they are.

    Those are the correct settings:

     

    file type:missing value -- you have "BNDL"

    kind:"Folder" (ro) -- you have "Keynote Document"

    creator type:missing value -- you have "????"

    name extension:"" (ro)  -- you have "key"

    type identifier:"dyn.age8u" (ro) -- you have "com.apple.iwork.keynote.sffkey"

    default application:alias "Seed:System:Library:CoreServices:Finder.app:" -- you have COMPUTERNAME:Applications:Preview.app:"

    package folder:false (ro) -- you have true

     

    See that most of the items that have to be changed are (ro) read only, which means that one can not change them using AppleScript's System Events. I do not know how to access those Mac properties via the Unix side (I'll look into it).

     

    I created a folder in my system and named it teste.key. I was able to change the app that open the folder to "Finder" as it should, but the system still saw it as a file. Then I changed the name to testek.ey and everything worked correctly.

     

    So, for the moment I'd suggest you change her login to janek.ey. That would set things straight momentarily.

    I'll look further to see if there is a way to change some of the properties above either via AppleScript or via shell script.

  • 7. Re: User's last name matches keynote file extension. Her account on the Mac now has random problems.
    deivy Level 4 Level 4 (2,365 points)

    Just to add, if you do change her home folder's name, run the script again and check to see that you get what you should (compare to my results above).

  • 8. Re: User's last name matches keynote file extension. Her account on the Mac now has random problems.
    morriszcat Level 1 Level 1 (0 points)

    Hi Deivy,

     

    I was away for a couple of days. Sorry!

     

    So I tried signing in as janek.ey does not work since it uses AD to authenticate on our server.

     

    Changing the home folder name solved the issue! I changed it to jane_key. Although, according to the script, it still shows up as a keynote file, but in Finder, it shows up as a folder, and the "Kind" is a Folder as well. Check it out:

     

    {short version:"", container:folder "COMPUTERNAME:Users:" of application "System Events", path:"COMPUTERNAME:Users:jane.key:", file type:"BNDL", volume:"COMPUTERNAME", physical size:missing value, URL:"file://localhost/Users/jane.key/", id:"jane.key,-100,4059987", displayed name:"jane.key", busy status:false, kind:"Keynote Document", creator type:"????", version:"", name extension:"key", POSIX path:"/Users/jane.key", name:"jane.key", modification date:date "Wednesday, June 26, 2013 11:32:17 AM", size:missing value, class:alias, type identifier:"com.apple.iwork.keynote.sffkey", package folder:true, stationery:false, creation date:date "Wednesday, June 19, 2013 12:42:01 PM", default application:alias "COMPUTERNAME:Applications:Preview.app:" of application "System Events", visible:true, product version:""}

     

    She has not called me for any weird issues since. This was sometime last week. As you can see from the modification date, that was me on my own mac, showing you the results of the script.

  • 9. Re: User's last name matches keynote file extension. Her account on the Mac now has random problems.
    deivy Level 4 Level 4 (2,365 points)

    Morris, I believe SetFile in Terminal (man SetFile for more) can set the creator and type of file. Also it can set whether or not a File is a Bundle.

    If everything is fine now with jane_key and you don't want to "spoil it", I'd suggest you create an account for john_key and play with it.

    Once  you are satisfied, you can make the changes on jane's home folder.

    By the way, I'd try to set the bit of Bundle to 0 (lower case "b") and set type and creator to "".

    Run the script and see if it is closer to mine output.

     


    I'll try to find out if it is possible to set some of the (ro) propeties above.