William Bowden1

Q: Mavericks network homes

All running well in upgrade apart from one little issue.

When a network user logs into any computer on the network all goes well until he logs off. To the user he has logged of but the server still keeps him logged on.

This is an issue if he then tries to log onto another computer, where he finds that mail etc does not work because the last computer has his network home.

If he restarts the computer this releases the Network home or if I log in as admin perform the command

 

  /sbin/umount -f  /Network/Servers/mx.anyserver.co.uk/Volumes/Server/HomesUsers

 

So Help tried a logout script but that does not work.

Set up several test servers and each time this issue occurs.

the client (10.9) does not logout properly

 

Please help very important. 

 

Last question to Apple do you test your software this was an obvious fault.

Posted on Nov 10, 2013 11:59 PM

Close

Q: Mavericks network homes

  • All replies
  • Helpful answers

Previous Page 2 of 4 last Next
  • by William Bowden1,

    William Bowden1 William Bowden1 Mar 18, 2014 12:50 AM in response to Peter Rauen
    Level 1 (35 points)
    Mar 18, 2014 12:50 AM in response to Peter Rauen

    I  put up a Apple bug report and have been told its in line to be fixed.

  • by MarkCoMan,

    MarkCoMan MarkCoMan Mar 18, 2014 5:23 AM in response to William Bowden1
    Level 1 (0 points)
    Mar 18, 2014 5:23 AM in response to William Bowden1

    By the time they fix it they will be coming out with a new OS. What is it? like every two years they think they need to change things.

  • by William Bowden1,

    William Bowden1 William Bowden1 Jun 2, 2014 7:52 AM in response to MarkCoMan
    Level 1 (35 points)
    Jun 2, 2014 7:52 AM in response to MarkCoMan

    You where right 10.10 here we come

    No fix Apple

  • by AMI289,

    AMI289 AMI289 Jun 17, 2014 5:32 AM in response to William Bowden1
    Level 1 (5 points)
    Jun 17, 2014 5:32 AM in response to William Bowden1

    Hi guys!

     

    It's been a while since the topic was opened, but from the amount of replies I uderstand it is still relevant.

     

     

    Anyway-

    I've answered this exact problem on another topic-

     

    https://discussions.apple.com/message/25406170

     

     

    Cheers!

  • by William Bowden1,

    William Bowden1 William Bowden1 Jun 17, 2014 8:44 AM in response to AMI289
    Level 1 (35 points)
    Jun 17, 2014 8:44 AM in response to AMI289

    Tried this and alas logout hook did not work very puzzled

     

  • by William Bowden1,

    William Bowden1 William Bowden1 Jun 17, 2014 8:45 AM in response to William Bowden1
    Level 1 (35 points)
    Jun 17, 2014 8:45 AM in response to William Bowden1

    Not tried on 10.10 yet test server installed but busy

  • by Hector Castillo,

    Hector Castillo Hector Castillo Jul 1, 2014 10:47 PM in response to William Bowden1
    Level 1 (20 points)
    Jul 1, 2014 10:47 PM in response to William Bowden1

    Updated server  and clients to 10.9.4 did not fix issues.

  • by William Bowden1,

    William Bowden1 William Bowden1 Jul 1, 2014 11:26 PM in response to Hector Castillo
    Level 1 (35 points)
    Jul 1, 2014 11:26 PM in response to Hector Castillo

    Yep here too

    Apple if you read these, this is a disgrace you have the financial resource to fix this quickly its nearly 1 year on and no fix!

  • by AMI289,

    AMI289 AMI289 Jul 1, 2014 11:42 PM in response to William Bowden1
    Level 1 (5 points)
    Jul 1, 2014 11:42 PM in response to William Bowden1

    Have you tried my suggestion about the logout hook??

     

    Becuase it is doing automatically what you've done manually using the admin account.

     

    If you did, please explain exactly how you did it.

     

    I would suggest copy-paste my code to apple script, and only change the mount point to yours

    /Network/Servers/mx.anyserver.co.uk/Volumes/Server/HomesUsers

  • by AMI289,

    AMI289 AMI289 Jul 2, 2014 12:05 AM in response to AMI289
    Level 1 (5 points)
    Jul 2, 2014 12:05 AM in response to AMI289

    MESSAGE REMOVED

  • by AMI289,

    AMI289 AMI289 Jul 2, 2014 12:07 AM in response to AMI289
    Level 1 (5 points)
    Jul 2, 2014 12:07 AM in response to AMI289

    Just a reminder (instead of going to the original post I've posted the answer)

     

     

    open AppleScript Editor (from Utilites folder),

    and copy-paste the following

     

     

              do shell script "sudo defaults write com.apple.loginwindow LogoutHook /Users/logouthook" with administrator privileges

              do shell script "echo $'#!bin/bash

              umount -f /Network/Servers/MY.SERVER.NAME/Volumes/MOUNT.VOLUME' > /Users/logouthook" with administrator privileges

              do shell script "sudo chmod +x /Users/logouthook" with administrator privileges

              do shell script "sudo chflags hidden /Users/logouthook" with administrator privileges

     

     

    Just modify the "/Network/Servers/MY.SERVER.NAME/Volumes/MOUNT.VOLUME" to your server address

    And don't accidently remove the apostrophe sign ( ' ) from after the server name, it will not work without it!!

    ALSO- The second 'do shell script' is intentionally two lines - DO NOT MAKE IT ONE LINE!!!

  • by Peter Rauen,

    Peter Rauen Peter Rauen Jul 2, 2014 11:30 PM in response to William Bowden1
    Level 1 (25 points)
    Jul 2, 2014 11:30 PM in response to William Bowden1

    I guess as for 10.9.x , this issue will not be adressed anymore. Hopefully 10.10 / Server 4.0 brings back this BASIC server feature. Poor Service from Apple and, sorry but I feel not comfortable in using a script i do not understand and  which may work or not.

     

    peter

  • by AMI289,

    AMI289 AMI289 Jul 3, 2014 8:37 AM in response to Peter Rauen
    Level 1 (5 points)
    Jul 3, 2014 8:37 AM in response to Peter Rauen

    Peter Rauen wrote:

     

    sorry but I feel not comfortable in using a script i do not understand and  which may work or not.

     

    peter

     

     

    Hi Peter,

     

    The script does work, at least for me (I don't know exactly what and how the OP tried to do that), and you don't have anything to fear of.

     

    We are working on an environment with 100+ iMac, and haven't had any issues since making this script.

     

    I think maybe I've forgot to mention it on my comment here ( I did give a link to my original post, which is explained over there though )-

    THIS SCRIPT MUST BE RUN ON THE CLIENTS COMPUTERS, NOT THE SERVER ITSELF !!!

     

    As the OP of this post, and I in the post I've linked to, mentioned, the problem is that when a network user is logging out, the system doesn't actually log out from the network share, and therefore, when trying to log in as another network user, there is some sort of 'collision' between the two.

    The server doesn't allow for the new network user to get access to his stuff, because he thinks that the last network user is still connected from the same computer.

    You can view this by logging out as a network user, then logging in as an local user, opening Terminal (Finder->Go->Utilities->Terminal) and running the following command 'df -h'.

    'df -h' simply give you a list of all mounted devices, which includes mounted network share points.

     

    I've explained it in detail in my original post, I've posted a link to above, but I will explain it again here for you.

    I'm not an native english speaker, so I'll do my best to be as clear as I can.

     

     

    "do shell script" simply means that AppleScript Editor should run the following command as a command line command (like typing it in Terminal).

     

     

     

    (line 1)

    do shell script "sudo defaults write com.apple.loginwindow LogoutHook /Users/logouthook" with administrator privileges

     

    The first line simply 'tells' the system to create a logout hook, meaning an action to be performed each time a user, no matter if local or network, is logging out.

    It 'tells' the system that the action to be performed is to run the file 'logouthook' which can be found in the '/Users' directory.

     

     

    (lines 2+3)

              do shell script "echo $'#!bin/bash

              umount -f /Network/Servers/MY.SERVER.NAME/Volumes/MOUNT.VOLUME' > /Users/logouthook" with administrator privileges

     

    The second and third lines, which is one command (aka one "do shell script" command) is just creating the above 'logouthook' script itself.

    It's begin with 'echo' command, which means just to display the following command on the screen,

    Following this is '#!bin/bash' which is just the start definition of this type of script.

     

    The line under is the actual command to be performed,

    'umount' is the Terminal command to unmount, or eject, a device.

    'umount -f' mean force unmount, meaning that even if device is in use, force it to eject,

    This is kind of similar to having a USB that doesn't want to eject, so you just unplug it, the system doesn't care if it is in use.

    Following that is the share point that you want to unmount, which you will need to adjust for your server mount point.

    To get this, simply do as I've mentioned above- log in as a network user, log out, then log in as a local admin, open Terminal, and type 'df -h'.

    You need to look for what appears under 'mounted on' which appears in the line of your network share point.

    Next to that is the '> /Users/logouthook' which simply means, instead of displaying the following command on the screen, create a file named 'logouthook' save it in '/Users/' directory, and save all of the command that was beforehand into that file.

     

    ****** IMPORTANT NOTE ******

    DO NOT (!!!!) make the second "do shell script" into one line !!!! It is constructed like that on purpose.

    And also DO NOT (!!!!!) remove the apostrophe sign (this sign-> ' <-) from the end of the share point (which in my example is .....MOUNT.VOLUME')

    If you do any of the above changes, IT WILL NOT WORK !!!!!

     

     

    (line 4)

    do shell script "sudo chmod +x /Users/logouthook" with administrator privileges

     

    The fourth line (the third "do shell script") simply sets a +x permission to the file,

    Which means that it allows it to be executed if any process try to.

     

     

    (line 5)

    do shell script "sudo chflags hidden /Users/logouthook" with administrator privileges

     

    The fifth line (the fourth "do shell script") makes the file hidden.

    We don't want anyone to enter /Users/ directory and accidentally throw our script to the trash.

     

     

     

    Now, save this script as an .app (In AppleScript Editor click on File->Export and then choose to save it as 'Application')

    This is done so it can be easily executed on each client computer.

    Now copy it to some shared directory on your network, go to each client computer, log in as a local admin and run this script.

     

     

     

    Reply if you need any more assistance, or if something isn't clear enough.

     

     

    Cheers mate.

  • by Hector Castillo,

    Hector Castillo Hector Castillo Jul 3, 2014 4:41 PM in response to AMI289
    Level 1 (20 points)
    Jul 3, 2014 4:41 PM in response to AMI289

    Hi AMI289, I am trying to get your script to work but I am having issues. I think I know where the problem is and maybe you can help. My server name is myoffice.server.private and my network users home folders are located on /Network/Servers/myoffice.server.private/Volumes/Data/Office Users Folders, i think the problem is the spaces in the folder name, can you tell me how to modify the script to work for me , this issue has been bugging me for almost a year, I really appreciate any help.

    Thanks Again

  • by William Bowden1,

    William Bowden1 William Bowden1 Jul 4, 2014 1:02 AM in response to Hector Castillo
    Level 1 (35 points)
    Jul 4, 2014 1:02 AM in response to Hector Castillo

    /Network/Servers/myoffice.server.private/Volumes/Data/Office\ Users\ Folders


    The backslash tell that there is a space


Previous Page 2 of 4 last Next