Showing posts with label Mountain Lion. Show all posts
Showing posts with label Mountain Lion. Show all posts

Thursday, September 26, 2013

Error opening terminal: xterm-256color

After opening a remote ssh session to Lion and Mountain Lion clients and attempting to launch pico (I know, I know, "real men use vi") I get the following error:

"Error opening terminal: xterm-256color"

Here is the fix (must be run from Terminal on the machine itself):
  • Open Terminal
  • Type "pico ~/.profile" (if it doesn't exist go ahead and create it)
  • Enter the lines:
    • TERM="xterm"
    • export TERM
  • Exit and save
ssh to the computer again and when you launch pico it should now open

Monday, February 18, 2013

Mountain Lion Server: An SSL error has occurred and a secure connection to the server cannot be made

After a recent Server.app update I was unable to log into a Mountain Lion server. 

I deleted Server.app from the Applications folder and downloaded it again from the App Store.  When I launched Server.app after the download it asked for the administrator credentials and then displayed the error "An SSL error has occurred and a secure connection to the server cannot be made."


My solution was to open Keychain Access, click on "System" (under Keychains) and then "Keys" (under Categories) and delete all the keys referencing my server name.  This includes both public and private keys so OS X will prompt if you really, really, want to do it.

I also removed the certificates for the server under System/My Certificates as well as "com.apple.servermgrd".

I crossed my fingers and restarted the server.  I logged in as local admin, launched Server.app and was able to configure it normally.  After the server was up and running I looked in Keychain Access and all the certificates had been re-populated.

Apple's KB on the problem wins the prize for the least helpful tech note ever.  You can see for yourself here:  http://support.apple.com/kb/TS4493.  All they suggest is upgrading to Server 2.2.1.  Guess what I was running when I encountered the error?  2.2.1.  What upgrade locked me out of my server?  2.2.1.  Thanks guys!

Wednesday, December 12, 2012

Spotlight not working in Mountain Lion

We have received numerous report that in Mountain Lion Spotlight is not searching local HDDs.  Since Outlook also uses Spotlight, no mailbox searching was possible either.

The fix is two-fold.  The first thing to do is delete the index metadata:

sudo /rm ./metadata_never_index

Secondly, re-enable spotlight indexing:

sudo mdutil -a -i on

Technically simply turning Spotlight indexing ON using the mdutil command should resolve the problem.  However we have found that you must first delete the index file first.

Update:  We ran into a computer where the above steps did not resolve the indexing problem.  On that machine the .metadata_never_index file was in the root volume (don't know why).  Removing that file and then running "sudo mdutil -i on /" resolved the problem.
 
1.  Double check that the .metadata_never_index file is not located at the root of the volume you are attempting to index
2.  Disable spotlight indexing for the volume:  sudo mdutil -i off /
3.  Remove the index from the volume:  sudo mdutil -E /
4.  Remove the .Spotlight directory from the root if it exists
5.  If there is a .Spotlight-V100 directory in the root, remove it: sudo rm -rf .Spotlight-V100
6.  Enable indexing for the volume:  sudo mdutil -i on /

Friday, October 19, 2012

10.7 and 10.8 Clients do not generate Kerberos tickets at login: FIX

(For information about forcing 10.6.x clients to get a Kerberos ticket at login see this Apple KB)

We have encountered a problem where Lion and Mountain Lion clients are not generating Kerberos tickets at login.  This causes problems with single-sign-on (SSO) to network shares as well as with Kerberos enabled applications like SAP.

Apparently Apple's latest version of Kerberos will not automatically request a ticket when a Kerberos enabled application launches.  Instead you must either go to Terminal and type "kinit" and enter your password or force a ticket to be generated at login using the following instructions.

Note: in order to correctly authenticate using Kerberos enabled applications like SAP your user name in AD and in the application itself must match.  This means that both your SAMAccount name and UPN in must be identical- including the case.  Many non-Microsoft instances of Kerberos are case-sensitive.

To generate a Kerberos ticket at login (10.7 and 10.8 clients):
  •  Open Terminal
  • Type "sudo -s" and authenticate as super user
  • Navigate to /etc/pam.d
  • Type "cp authorization authorization.bak" to make a backup of the authorization file
  • Type "pico authorization" to edit the file (you could also use vi or your favourite editor)
Find the line:
auth       optional       pam_krb5.so use_first_pass use_kcminit
Add the key "default_principal" to the end of the line. For example:
auth       optional       pam_krb5.so use_first_pass use_kcminit default_principal
  • Save the file
  • Restart and log back into the computer
  • Check that a Kerberos ticket has been generated by opening Terminal and typing "klist"

Hosting Mountain Lion Software Updates on 10.6 or 10.7 Servers


This information came directly from Apple's KB:
  1. Update your server to Mac OS X Server v10.6.8 (or 10.7)
  2. Stop the Software Update service if it is running.
  3. Quit Server Admin if it is active.
  4. Update /etc/swupd/swupd.plist to begin hosting OS X Lion software updates. (See details below.)
  5. Update /etc/swupd/swupd.conf to allow OS X Lion computers to receive updates. (See details below.)
  6. Open Server Admin and start the Software Update service.
  7. Use the instructions in Mac OS X Server v10.6: Using the Software Update service with multiple Mac OS X client versions to point your OS X Lion clients to this server.
In step 4, you will need root access to update the file /etc/swupd/swupd.plist. To be safe, make a backup copy of the file before editing it. Add the string in bold below to the otherCatalogs array:

    otherCatalogs
   
        index-leopard.merged-1.sucatalog
        index-leopard-snowleopard.merged-1.sucatalog
        index-lion-snowleopard-leopard.merged-1.sucatalog
   


For Mountain Lion change the string to:

index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog

In step 5, you will need root access to update the file /etc/swupd/swupd.conf. To be safe, make a backup copy of the file before editing it. Locate the following line near the end of the file:

    RewriteCond %{HTTP_USER_AGENT} Darwin/11

Edit the following line to read:

    RewriteRule ^/index\.sucatalog$ /index-lion-snowleopard-leopard.merged-1.sucatalog

For Mountain Lion change the string to:

RewriteRule ^/index\.sucatalog$ /index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog