You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Mavericks Server Keychain not properly storing information network users.

OS 10.9.1, Server 3.0.2. Clients OS 10.9.1 bound to server Open Directory and managed with Profile Manager. 10.6.8 Mail server bound to 10.9.1 server Open Directory. Messages is running on the 10.9.1 server which hosts the users.


Changeip -checkhostname indicates DNS is correct for the server. Server is running on a FQDN, no .local or other DNS issues.


For everything below: the Keychain for any of the users does not need to be repaired.


Generally things are going well with one exception which is a big problem.


Each time a network user logs and tries to use either Mail to connect to our mail server via IMAP or Messages in they are prompted for passwords. Messages takes the password and logs in. Mail acts as though the password was incorrect and asks for it again, it does not pass the connection to the mail server. There is no trace of the attempted login on the mail server logs.


Functional workarounds:


1 - OS reinstall allows immediate login on the mail server and connections as expected. This is a little too much for day to day use.


2 - (From somewhere in the forums forgot who, sorry), User login, go to User's network home/Library/Keychains and move any keychains with long strings of letters and numbers as name to another folder or put in trash, immediately reboot, User login again, enter passwords in Mail, immediate connection to mail server and expected behavior from Mail.app.


As a network user machine in a multi user environment, the next user will have to repeat the entire procedure above, including the reboot, to get access to the contents of the mail server. The first user in the example above will have to repeat it, if they come back to the same machine and log in again.


This is what we are doing now. It appears that it would work on a personal machine with local users and has solved a lot of issues in the forum. It is helping but does not solve the keychain problem for network users.


Does anyone have any advice.


Thanks.


-Erich

OS X Server

Posted on Jan 10, 2014 6:34 PM

Reply
Question marked as Top-ranking reply

Posted on Jan 28, 2017 12:32 PM

It is our experience that it is still problem, in fact several different problems. 😟


Whilst there are many issues two of the major ones are -


  1. The 'new' local items keychain used for Apple programs passwords e.g. Mail, Contacts, etc. is stored in a per machine specific folder rendering it unusable for hot-desking
  2. Each new version of OS X has increased the use of SQLite databases to store settings and data and when used over a network as with network home directories these either get corrupted or locked so they cannot be used making programs like Mail, Contacts, and even Safari unusable, recent new uses include local items keychain itself and the new suggestions database for spotlight and looking up contacts and calendar entries in emails etc.


While I am still in the processing of reporting these issues to Apple especially the new SQLite problems I am in the process of changing all our users and giving up on network home directories. 😟

278 replies

Feb 6, 2016 2:45 AM in response to scottsign11

Hi Scott,


want to thank you for that keychain fix. Made my life very very easy in the last week!


I want to pick your brain and ask about Adobe Application Support folder redirect, has that helped you with Adobe apps like Photoshop and Ligthroom, or have you done it purely for Adobe Reader only?


We are a photography college and we are finding that Adobe applications like inDesign and Premiere, maybe Lightroom, have been crashing our AFP network homes! I have always had cache redirected, but never application support folder. We have 3 labs, 126 iMacs with 10.10.5 OS, 3 x 10.6.8 Server with network homes and 10.10.5 Profile Manager Server.


Also if i want to remove redirected Cache folder with Profile Manager, what are the settings i need to add to Custom options?


Any thoughts would be welcomed!


Adi

Feb 8, 2016 5:03 AM in response to PSC-Admin

I'm glad that helped you. I think the fix helps everything Adobe-related if it stores any files in that Adobe folder, which Photoshop does (I'm not sure about Lightroom). I would try it and see how it works, because we found we had problems when it wasn't redirected. It will work better if the files are local to the computer.


The four options for the symlinks are:

  • deleteAndCreateSymLink: Deletes the target folder in the home folder and creates a local symbolic link in its place.
  • renameAndCreateSymLink: Renames the target folder in the home folder and creates a local symbolic link in its place.
  • deletePath: Deletes the target folder in the home folder.
  • deleteSymLinkAndRestore: Deletes the symbolic link and restores the folder that was renamed by the renameAndCreateSymLink action.


So if you want to delete the symlink, use deleteSymLinkAndRestore.

Mar 29, 2016 6:40 AM in response to Sleestak Prime

I think I found a permanent solution, even it's not fully automatically done.


1. Login the user need a fix

2. Go to ~/Library in Finder and copy the whole "Keychains" folder in a /User/Shared subfolder (I've created /User/Shared/username/Library for every user)

3. Trash any file other than "login.keychain" in /User/Shared/username/Library/Keychains/

4. Open "/Applications/Utilities/Keychain Access" app

5. Double click on /User/Shared/username/Library/Keychains/login.keychain and a new "login" (not bold) keychain should appear in Keychain Access

6. Select the new "login" (not bold) keychain and unlock it

7. Insert the login password

8. Ctrl+click on the new "login" (not bold) keychain and select > Make Keychain "login" Default

9. Reboot


Works on all my workstations, for the moment. Still hoping....

Mar 31, 2016 5:03 AM in response to Gerard Dirks

Yes, because the user must change their keychain access preference, but you could, I suppose, copy the login.key in mass, via shell, and instruct users how to add the new keychain and change their preferences. The concept is not to fool the system with link or other trick to get the login.key on the hd but make the system know there it is. The only inconvenient (not my case) is if your user change Mac frequently, so must be done on every Mac and the sync could be lefted to iCloud Keychain. Hope to help.

Mar 31, 2016 5:39 AM in response to Gerard Dirks

As per frederico254's reply this approach of copying a keychain to the local drive requires it to be done for each user on each machine. While I would expect this approach to complete resolve this particular issue I do regard it as incurring to much work i.e. doing so for each user for each machine.


I have had the same problem at my office and the previously suggested workaround of setting up a logout hook which kills Secd processes does appear to have resolved this issue for the most part. Occasionally users might have to reboot or we might have to take other steps but nowhere near as often as before. (I have a slight suspicion that the problem still comes and goes perhaps depending on other Apple software updates.)


Here is my script I use for the logouthook


#!/bin/bash
# Kill secd processes left running after user logs out
killall -9 secinitd
killall -9 secd
logger "LogoutHook killed processes"
# Unmount network home directory share if left mounted after user logs out
mountpath=`mount | grep /Network | awk '{print $3}'` 
if [ "$mountpath" != "" ] 
then 
  umount -f $mountpath 
  logger "LogoutHook unmounted network home"
fi
# Delete old stuff from /private/var/folders - mainly cache files after user logs out
find /private/var/folders/* -type d -mtime 1 -exec rm -rf {} \;
exit


I have over time been adding more things to this, the first is the aforementioned killing of the secd processes (lines 3 and 4), then there is another section which unmounts any user home directories that have not been done automatically, then there is a section to clear out cached files in /private/var/folders


Feel free to use all three steps but the first one is the most important.


If you go back earlier in this thread you will see another suggested fix which not only kills the two secd related processes (like mine) but kills up to 20 processes left running after a user logs out. It is as you might imagine a lot more complete and I did not feel the need to go that far. 😉

Mar 31, 2016 7:16 AM in response to federico254

federico254 wrote:


But what appen with HomeSync? Unmounting the home volume is not a problem?

If you are using home syncing then that means you are not really using a network home directory rather you are using a home directory on the local drive which is being synced to the server. If you are using a local home directory then you should not be having the keychain issue at all since your keychain will already be being stored locally.


So, are you using a a true network login and network home directory setup? Or are you using what is more commonly called a portable home directory setup with syncing?

Mar 31, 2016 7:34 AM in response to John Lockwood

Apple calls Mobile Account, if remember correctly, and the problem is a constant with Mobile Account. The fun fact is that, at login, the system load also the network home, other than the local one and the problem is even worst: sometimes the system say the Login Keychain cannot be found, as it not exist. Consider that I've migrated the users from Network Home to Mobile Account (Network Home with sync) for 2 problems, one is the Keychain and the other the iCloud Drive and iCloud Photo Library (that not working on network drive).


PS. If I correct remember the Portable Home is a Home on a removable drive attached at the Mac, not use the OpenDirectory.

Apr 26, 2016 1:22 AM in response to John Lockwood

Hi John,


Thank you for the support. I wrote many documented bugreports to apple, but there is nobody !!


1)

echo `mount | grep /Network | awk '{print $3}'`

gives

"on /Network/Servers/xserver.domain.ch/Volumes/xyz"

and unmounting this will not work. :-(


2) There are many other processes running after logout (shame on apple). I use this commands.

username=$1

killall -15 -u $username

#if not ...

killall -9 -u $username

What you mean about this commands?

Apr 26, 2016 1:54 AM in response to Luda24

Luda24 wrote:


Hi John,


Thank you for the support. I wrote many documented bugreports to apple, but there is nobody !!


1)

echo `mount | grep /Network | awk '{print $3}'`

gives

"on /Network/Servers/xserver.domain.ch/Volumes/xyz"

and unmounting this will not work. :-(


2) There are many other processes running after logout (shame on apple). I use this commands.

username=$1

killall -15 -u $username

#if not ...

killall -9 -u $username

What you mean about this commands?


With regards to echo `mount | grep /Network | awk '{print $3}'` this works for me using ARD to remotely test a logged in user using your example I get back "/Network/Servers/xserver.domain.ch/Volumes/xyz". If you can try testing the same way or you could enable ssh aka. remote login and do a similar test. If in your case it always includes 'on ' then you could add a command to strip that however awk '{print $3}' should be printing the third word/column and the space symbol is normally used to determine the column seprator.


The second item about killall -15 -u $username was not from my post so I cannot answer that. The original fix as included in mine only killed the two secd related processes but someone else has earlier posted a means of killing all left over processes via a much more complex and lengthy script. I have not found it necessary to go to that extreme.

Mavericks Server Keychain not properly storing information network users.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.