Showing posts with label Active Directory. Show all posts
Showing posts with label Active Directory. Show all posts

Thursday, 27 March 2014

Mac OS X clients getting wrong DNS names

Hi, so we've had macs here for a long time. We eventually got them working with the Active Directory, and with this I thought would also come the DNS or DDNS names i.e. mymac.instituation.ac.uk (for local network stuff). I must iterate here that this is just for internal name lookups, nothing external here, no internet related stuff, intranet ONLY.

So, it worked on most of them. After adding them to active directory, they got their names: 'mymac1.institution.ac.uk', but for about 1 in 5 macs (we have about 150) it'll give it the DNS name of some random machine in college! So instead of it saying 'mymac.institution.ac.uk' it'll say 'somonesPC.institution.ac.uk' !!!!!

I've put up with it for about 7 years, just used the mac sharing name instead, and remembering IP addresses. But we're trying to integrate the macs further into the network, and this is perhaps one of the last hurdles.

Anyway, I did some searching and found this quite frustrating forum. Seems lots of people not communicating very well. At the end, someone suggested this solution. I've yet to try it but if anyone has any comments?


So, I've now found a command which changes: Computer Name, Host Name, Local Host Name:
scutil --get ComputerName
scutil --get HostName
scutil --get LocalHostName

The Computer Name and Local Host Name is the one set up through System Preferences > Sharing, at the top


scutil --get ComputerName|scutil --set HostName

Wednesday, 26 February 2014

OS X Mavericks AD failed to login because an error occurred

After updating to Mavericks 10.9.1 I seem to be having problems logging in under active directory.

Found this post which describes similar issues.

Seems my problem is now fixed. Not sure what caused it or fixed it though.

Tuesday, 15 October 2013

Deleting 'forced' local home folders created from OS X 10.7 Active Directory Logins

When users log in to the apple macs at the college it creates a local home on the machine to save preferences and files, and mounts their home drive too.

After a year these fill up. After a few searches and researches, looks like the easiest way is to write a script which deletes all folders except certain ones. Looks like you can use the 'find' command. Found a good example here:


find . -maxdepth 1 -not -name 'filename.gif' -iname '*.gif' -delete

Here's the man page for find

So, I don't want to delete the folders:
Guest
Shared
administrator
media

So:
find . -maxdepth 1 -not -name 'Guest' -not -name 'Shared' -not -name 'administrator' -not -name 'media' -name '*' -delete
I tried '*.*' but it only then deletes files with '.' in them, not folders. '*' selects everything including folders

Actually, I found here that the slightly better way to do it was to use the -exec rm instead of -delete. This then tells you which directories were actually deleted:
find /Users/Shared -maxdepth 1 -mindepth 1 -not -name 'administrator' -not -name 'Guest' -not -name 'Shared' -not -name 'media' -exec rm -Rvf {} \;
The -mindepth 1 option makes sure it doesn't delete the parent directory.

A longer term solution would be to delete these folders on logout, so the students and staff could get used to not relying on these folders.

Wednesday, 11 July 2012

OS X 10.7 and 10.8 and 802.1X wifi configuration

So, new operating system new things to do. Just read the Help Center bit on "Connect to a network that requires 802.1X authentication". The interesting bit was:

In most cases your network administrator provides a configuration profile that contains the information and settings you need to authenticate with the network.

To get on the 802.1X you now need to do a lot of stuff. Looks like it needs a .mobileconfig file.

Just read this Apple Discussion on it which gives you a nice guide on how to do it.

After much time we finally got around to having a network administrator on the case.

So, we were looking for a way to connect to the wifi without using usernames and passwords. The answer was EAP-TLS. We followed the link above and created a certificate for the computer. Only trouble was we had problems enabling TLS on the wifi. Network administrator looking into this I think.


We resorted to PEAP I think. We made a .mobileconfig file using the iphone configuration utility, got hold of the wifi certificate, put that in the credentials payload of the .mobileconfig file, and loaded it up on the machine in question. It added the certificate to the Users keychain (not system!) and put the old 802.1X stuff in the network settings! When we turned the wifi on it tried to connect to the wifi (with the username and password we set in the .mobileconfig file) but it came up with an error. Could not verify the server. Looks like the configuration file was at fault. Seems that the certificate server is automatically dishing out expired certificates. Network administrator is trying to fix.

A handy page to manually create a .mobileconfig file with more settings then the iphone configuration utility can create was here. You can specify the certificate to be added to the system keychain, and also that the wifi loads at login window!


------

So far so good. Our network team has now made a new wifi SSID with EAP-TLS. Using this tutorial we made the machine have a signed certificate from the certificate server, and add the profile for the wifi. We used this certificate (with the username - host/DNSnameofMachineHere) to successfully get onto the wifi, but did it manually.

Next time we'll need to set this file up with the wifi details properly (we didn't add system login window stuff here).


-----

We're now giving up on the old 'manually edit the .mobileconfig file' and going for the 'Mavericks Server' option.

Here's the help page on it

So, we've set up a mavericks server (just a computer with Mavericks installed and the "Server" app installed).

I've enabled "Profile Manager" and set it up so in a browser you can go to:
http://YourMavericksServer.ac.uk/profilemanager

go to groups, general.
from the list of payloads, go to AD Certificate

found this article on how to configure the page

Not quite working yet. Getting an error when installing the profile.

Need to add devices, but I think it looks like you have to add users which are in charge of devices? Not sure.

Tuesday, 10 July 2012

Creating a Master Image for Mac OS X 10.7

So, I've just got a bunch of new iMacs and I'm creating a new master so I thought I could note down what I'm doing.


  1. Go through the initial steps of OS X 10.7.3
    1. username - Administrator
    2. fill in details
  2. setup some System Preferences
    1. in System Preferences > Users
      1. Guests
        1. Tick "Allow Guests to log into this computer"
      2. Login Options
        1. tick the "show username and password fields"
        2. go to Join and open Directory Utility
          1. Active Directory
            1. domain students.chesterfield.ac.uk
            2. name the computer
              1. domain admin username and password
          2. LDAPv3
            1. put in mac server address
            2. its all automatic
          3. goto Edit > Enable Root User
            1. enter a special root password
    2. System Preferences > Network
      1. Ethernet > Advanced > Proxies > Automatically Detect Settings
    3. System Preferences > Date and Time
      1. tick "set date and time automatically" and give it a****dc1.chesterfield.ac.uk
    4. System Preferences > Sharing > Remote Management
      1. Tick Remote Management
      2. click "Options"
        1. tick all of these
      3. click "Computer Settings"
        1. tick all of these
        2. put a password for VNC
  3. Install stuff:
    1. Sendlogon
      1. for proxy login
    2. NHR
      1. for Caches and other network folder redirections
    3. Fix NHR and Sendlogon
      1. so that sendlogon is added to the NHR login script
    4. UniFLOW client
      1. for print management info
    5. Intuos drivers
      1. for tablets
    6. Brushes Viewer
    7. Adobe Creative Suite 5
      1. mount the CD Master dmg file and run the normal install file
        1. don't need to drag it to the local drive
    8. Adobe Acrobat Pro 9
      1. just drag it to the Applications folder
      2. run it once to put in serial number
    9. Update Photoshop Camera RAW
    10. Burn 2.5.1
      1. for burning a multitude of different disks and ISO's
    11. Carbon Copy Cloner 3.4.5
      1. just drag app to Applications folder
    12. Celtx 2.9.7
    13. ClickView 2.0.0
      1. comes with Flip4Mac
    14. DivX 7.3
    15. DropBox 0.7.110
      1. drag to Applications folder
    16. Firefox 13.0.1
      1. drag to desktop
      2. if there's no profile in the users library it defaults to "use system settings"
    17. Google Chrome version 20
    18. Sketchup 8.0.14345
    19. Final Cut Studio 2

      1. Running Final Cut Studio 2 from disk it comes up with:
        1. You can't open the application FinalCutStudio.mpkg because PowerPC applications are no longer supported.
        2. Doh!
      2. I did a search on Google and found this Blog Article on how to manage it
        1. Basically run the installer from Command Line by typing the following:
        2. sudo installer -package /Volumes/Final\ Cut\ Studio/Installer/FinalCutStudio.mpkg -target /
        3. Came up with lots of Errors though, as described in the blog:
          1. 2012-07-09 13:02:25.728 installer[26889:9803] PackageKit: Token definition is missing bundle identifier, skipping: {
          2.     path = "/Applications/Final Cut Pro.app";
          3.     searchPlugin = CheckPath;
          4. }
        4. looks like it's searching for previously installed versions?
      3. In the end it came up with:
        1. installer: The install was successful.
      4. although it usually takes a few hours to install, this took 8 minutes
        1. It's because it didn't install the extras
        2. To do so, you can do it from the disks:
          1. Audio Content for Soundtrack Pro
          2. Motion Content
          3. DVD Studio Content
          4. LiveType Media 1 and 2
            1. comes up with the same PowerPC errors
            2. Type:
              1. sudo installer -package /Volumes/LiveType\ Media\ 1/Installer/LiveTypeMedia1.mpkg -target /
              2. sudo installer -package /Volumes/LiveType\ Media\ 2/Installer/LiveTypeMedia2A.pkg -target /
    20. XDCAM Final Cut Pro Plugin
      1. Needs Final Cut Pro 6.0.3 or above. Installed version is 6.0.1.
        1. Update via Software Update
    21. Handbrake 0.9.6
    22. iWork '09
    23. Logic Studio
      1. Same error as with Final Cut Studio
      2. Found this website with similar results
      3. Typed this:
        1. sudo installer -package /Volumes/Logic\ Studio/Installer/LogicStudio.mpkg  -target / -verbose
        2. decided to use verbose mode to see what exactly happens. Most interesting.
      4. I think it helps if you have all your disks saved as disk images and all mounted at once. Seems to work.
      5. Not sure if it installed the extras. To make sure I ran the Audio Content installer
      6. What might be worth looking into is this forum above for installing extras
        1. ran this as in the website above:
          1. for f in /Volumes/Jam\ Pack\ Content\ 1/Installer/Packages/*.pkg; do sudo /usr/sbin/installer -pkg "$f" -target / -verbose; done
    24. Maya 2008
      1. although not the licence aw.dat file
    25. Microsoft Office 2011
    26. MPlayer OSX Extended R14
      1. Plays nearly all Video formats
    27. Nikon ViewNX 2
      1. for Nikon Camera RAW stuff
    28. Omni Disk Sweeper 1.7.2
      1. for checking disk space issues
    29. Libre Office 3.5.4
      1. basically an off-shoot of OpenOffice
    30. RealPlayer SP 12
      1. for streaming stuff
      2. might have to put in proxy settings?
        1. not even sure if we're using this?
        2. yes, it is setup by autodetect settings
        3. set through ~/Library/Preferences/com.RealNetworks.RealPlayer
        4. particularly "RealPlayer\UseSystemHTTPProxy" string "1"
    31. Skype 5.8.0.945
      1. you never know!
    32. SMART board 10.8
      1. Apparently rolling out 11 next year
    33. VLC Media Player 2.0.2
    34. Canon MFD drivers
      1. whoops, missed off these!
  4. Log out and back in as Networked user to connect to internet (with sendlogon)
    1. Note: needs to be on the Mac VLAN to use sendlogon
    2. Test Safari and other things for internet connectivity
      1. working
    3. Do an Apple Software Update
      1. update from 10.7.3 to 10.7.4
      2. airport update
      3. iTunes 10.6.3
        1. connection reset by peer
        2. looks like a manual download
      4. Camera RAW update
      5. etc...
    4. Microsoft Update
    5. Adobe Update
    6. App Store Updates!
      1. it's a new one to me
      2. you also NEED an Apple ID!
      3. having a few problems downloading BIG updates for iPhoto and iMovie
        1. seems to stop 400MB into the download and says it's having trouble
        2. Lucky thing is that it carries on from where it left off, so just keep pressing the retry button and it'll eventually download it all
      4. Install more Apps:
        1. iBooks Author
          1. for making iBooks!
      5. SketchBook Express
        1. made by SketchBook Pro people
      6. Need to look into App Store Permissions
        1. can anyone install via the App Store?
        2. is it just saved to their Home Drive?
        3. Confussed!
        4. this forum might help
    7. Test all Applications:
      1. Illustrator
        1. Working
      2. Photoshop
        1. Working
      3. InDesign
        1. Crashes when you try the Spell Check
          1. turns out NHR gives the wrong permissions for the ~/Library/Application\ Support/Adobe folder
          2. I changed NHR so that this Adobe folder is a symlink instead of the child folders for Illustrator and Acrobat
            1. added these lines to LIclean.hook
              1. rm -rf "$home_loc"/Library/Application\ Support/Adobe
              2. mkdir /tmp/$1/Adobe
              3. ln -s /tmp/$1/Adobe/ "$home_loc"/Library/Application\ Support/Adobe
          3. overwrote LIclean.hook in NHR.pkg/Contents/Archive.pax.gz
            1. first unzip it
            2. replace file
            3. zip it back up again:
              1. ditto -c --keepParent /Archive/Library Archive.pax
              2. gzip -9 Archive.pax 
      4. Fireworks
        1. working
      5. Flash
        1. working
      6. Dreamweaver
        1. hangs when loading up.
        2. updating to 11.0.4
          1. now it prompts to load up extension manager every time!
          2. but it does end up loading Dreamweaver
      7. Acrobat Pro
        1. Working
      8. Aperture
        1. Working
      9. Audacity
        1. Working
      10. BookSmart
        1. permissions issue with .app folder
          1. gave everyone read only
        2. crashes on load up
          1. found this entry in Console Log
            1. 06/07/2012 15:21:23.621 [0x0-0xb40b4].com.blurb.booksmart: log4j:ERROR setFile(null,true) call failed.
            2. 06/07/2012 15:21:23.621 [0x0-0xb40b4].com.blurb.booksmart: java.io.FileNotFoundException: metrics.log (Permission denied)
            3. 06/07/2012 15:21:26.275 com.apple.launchd.peruser.2069522553: ([0x0-0xb40b4].com.blurb.booksmart[6906]) Exited with code: 1
          2. assuming it's a problem with folder permissions in ~/Library/
          3. not sure it's worth fixing?
      11. Word
        1. worked
      12. Powerpoint
        1. worked
      13. Excel
        1. worked
      14. outlook
      15. Google Chrome
        1. crashes on startup
          1. loads a window with google mail login screen and then sends crash report.
          2. just tried creating a symlink to the local drive for ~/Library/Application\ Support
            1. ln -s /Users/Shared/temp/Google ~/Library/Application\ Support 
          3. Works a treat
          4. Need to add this to NHR scripts
            1. Viewed the Package contents of NHR.pkg
            2. unzipped Archive.pax.gz
            3. went into Library/Scripts/
            4. edited LIclean.hook
              1. added these lines:
              2. mkdir /tmp/$1/Google
              3. rm -rf "$home_loc"/Library/Application\ Support/Google
              4. ln -s /tmp/$1/Google "$home_loc"/Library/Application\ Support/
            5. made it into an Archive.pax.gz file (found in this forum)
              1. ditto -c --keepParent /Volumes/General\ Work/Problem\ Solve/NHR\ with\ new\ redirections/Archive/Library /Volumes/General\ Work/Problem\ Solve/NHR\ with\ new\ redirections/New-12-8-2012/Archive.pax
              2. gzip -9 /Volumes/General\ Work/Problem\ Solve/NHR\ with\ new\ redirections/New-12-8-2012/Archive.pax 
            6. put it back in the Package Contents
          5. done
        2. Picks up Proxy settings from operating system
      16. Firefox
        1. works a charm
        2. Picks up proxy settings from system
      17. Celtx
        1. worked
      18. Clickview
        1. needs the server set as clickview.s*******.chesterfield.ac.uk
          1. set in file: ~/Library/Preferences/clickview.player.server.plist
          2. either set on xserves managed preferences
          3. or on the OS X managed preferences
      19. fix everything please
        1. works beautifully
      20. Sketchup
        1. worked
      21. HandBrake
        1. Worked
      22. iBooks Author
        1. Worked
      23. iMovie
        1. Worked
      24. iPhoto
        1. prompts to upgrade library and fails as it is on an unsupported media
          1. Known Problem
      25. iTunes
        1. worked
      26. Pages
        1. Worked
      27. Keynote
        1. worked
      28. numbers
        1. worked
      29. Libre Office
        1. worked
      30. MPlayer OSX extended
        1. Worked
      31. realPlayer
        1. worked
      32. SketchBook Express
        1. Worked
      33. Skype
        1. worked
      34. Notebook
        1. needed license but we have it
        2. worked
      35. Final Cut Pro
        1. worked
      36. Logic
        1. worked
    8. Log out of Networked user account
  5. Image a Master from the machine
    1. Unbind from Active Directory
    2. delete unwanted files
    3. Boot from another disk. Either:
      1. Netboot (if possible?)
        1. not possible because server is running OS X 10.4.9 with Deploy Studio RC20
      2. boot from install CD, mount server drive and image machine using disk utility
        1. does not come with disks anymore
        2. found this article explaining the new procedures
          1. boot up into Recovery Mode (command + R)
            1. Nice article here about Recovery Mode
      3. target disk mode to a machine which can netboot (or run the /Utilities/Deploy Studio Runtime)
    4. Make a image from a disk
  6. test the master image works
    1. get another machine
    2. Unmount disk which is being re-imaged and image it. Several Ways:
      1. target disk mode to another machine
      2. Recovery mode (command + R)
        1. go to terminal
        2. type:
          1. mkdir /Volumes/Images
          2. mount -t afp afp://admin:password@name.of.server.uk/Images /Volumes/Images
        3. exit terminal
        4. open disk utility
        5. restore
        6. source - select disk image on the server
        7. target -  select partition
      3. done



Thursday, 17 May 2012

Safari Crashing on OS X 10.6.8 for Active Directory Users

It appears on the machines where they were 'accidentally' updated to OS X 10.6.8 (we currently run OS X 10.6.6), Active Directory users cannot run Safari as it crashes on launch. For local users Safari works fine. I have deleted the ~/Library/Safari/ folder and also the ~/Library/Preferences/com.apple.safari* files.

My initial conclusion is that Safari doesn't like the permissions on certain folders in the ~/Library folder. e.g. Caches folder. I am used to this issue hence the installation of the useful program "NHR" (Network Home Redirection"), which currently redirects the ~/Library/Caches folder to a local location. I shall look into pinning down which folder needs redirecting. I have found this post which suggests ~/Library/Safari/WebpageIcons.db causes crashes. I shall continue to add to this post.

Monday, 23 April 2012

Inventory Booking mechanism for Inventory

Now I'm getting into Joomla, thought I'd check out a few inventory booking extensions. Found one which looks excellent - JomRez

Here's a demo of it on their servers.

With this system I can visualise the situation working as follows:

  1. Browse to the correct webpage
  2. log in
  3. if your a student:
    1. search for the resource
    2. book it out if it is free
  4. if your staff
    1. add resources
    2. check booking status
    3. sign back in
    4. search for free resources
Questions
  1. could it use Active Directory logins?
    1. Yes, I think so. Found this forum on the topic although couldn't look at it
  2. does it manage assets?
One thing I have read is that it is good, but to get it really customised you will probably need to buy the extensions. These generally start at £9.99 and go up to £29.99.

The next thing to do is to test it:

  1. install MAMP
    1. make a new database in myphpadmin
      1. I named it "inventory"
  2. install Joomla
  3. download JomRez and install
    1. found this article on how to install
      1. download Download jomres_webinstall.zip or just jomres_webinstall.php
      2. Place this in the root of the joomla
      3. run the jomres_webinstall.php in the browser
        1. this came up with:
          1. We are unable to comunicate with the updates server, you might have a firewall preventing your server from communicating with the jomres.net servers. You should create some rules that allow your server to communicate with the domains "updates.jomres4.net", "plugins.jomres4.net" and "license-server.jomres.net"
          2. I could ping all of these from my machine?
        2. So, might as well just install it manually
      4. Nope, can't find the manual install zip.
      5. installed it on a server using the webinstall and worked fine
  4. add assets
    1. as it's geared for hotel bookings the only way I've thought of doing it is to add each asset as a room in a hotel.
    2. I'd have to go into the database and find the room type and add a different room type for each different item we had.
  5. test asset management
    1. can't really manage assets
  6. test booking mechanism
  7. test logins
Well, to conclude, if I want this to work as an inventory management utility I'd need to buy plugins. It's ridiculously restricted.

The way I can concieve to make it work is to have the college as a hotel, and it have 'room types'. You can have a number of each room type, each bookable. Too confusing.

Had another look on Joomla and found only paid things! Doh! Can't get everything for free. I shall go back to Access Databases.

Tuesday, 27 March 2012

Problems with HP Scan Pro app with Scanjet 4370

Well, we have a computer suite with OS X 10.6.6, and 4 x HP Scanjet 4370. Just recently we've been having random troubles. It seems sometimes, when an active Directory user logs in and tries to use the HP Scan Pro App, when the scanner has scanned and is about to save the scan, it crashes!

After this point the scanner needs to be switched off and back on again.

I initially thought it was a problem with saving to an SMB share and did actually find an entry in the logs:
smb_maperr32: no direct map for 32 bit server error 10.6

I found a few forums which mentioned changing the file smb.conf but this was for OS X 10.5 and below.

I finally gave up and found the latest HP Scanner application -> HP Scan 2.4.4

This looks a lot different, but I didn't have any trouble with it. One annoying point is that it the install file isn't a standard pkg or mpkg file, but does contain them! As it was only 9 machines to install, I just did it the 'old school' way.

Here's the tutorial I made for it

Wednesday, 7 March 2012

Mac OS X 10.6.6 Active Directory Login issues

A while after updating all the Apple Suites to 10.6.6 I started getting a few Apple Macs which would not let anybody log in. I had a look at the system log and found this:


07/03/2012 15:44:22    kernel    Ethernet [AppleBCM5701Ethernet]: Link up on en0, 100-Megabit, Full-duplex, No flow-control, Debug [796d,0300,0de1,0300,41e1,0000]
07/03/2012 15:44:25    configd[13]    setting hostname to "n240-11904.local"
07/03/2012 15:44:25    configd[13]    network configuration changed.
07/03/2012 15:44:26    configd[13]    network configuration changed.
07/03/2012 15:44:26    configd[13]    setting hostname to "n240-11904.ictservicestest.somewhere.ac.uk"
07/03/2012 15:44:27    com.apple.DirectoryServices[15]    Enter machine password:
07/03/2012 15:44:28    com.apple.DirectoryServices[15]    [2012/03/07 15:44:28, 0, pid=466] /SourceCache/samba/samba-235.5/samba/source/libads/kerberos.c:ads_kinit_password(228)
07/03/2012 15:44:28    com.apple.DirectoryServices[15]      kerberos_kinit_password N240-11904$@STUDENTS.somewhere.AC.UK failed: Preauthentication failed
07/03/2012 15:44:28    com.apple.DirectoryServices[15]    [2012/03/07 15:44:28, 0, pid=466] /SourceCache/samba/samba-235.5/samba/source/libads/kerberos.c:ads_kinit_password(228)
07/03/2012 15:44:28    com.apple.DirectoryServices[15]      kerberos_kinit_password N240-11904$@STUDENTS.somewhere.AC.UK failed: Preauthentication failed
07/03/2012 15:44:29    mDNSResponder[31]    RegisterInterface: Frequent transitions for interface en0 (FE80:0000:0000:0000:CA2A:14FF:FE0B:B63D)
07/03/2012 15:44:33    com.apple.DirectoryServices[15]    Enter machine password:
07/03/2012 15:44:33    com.apple.DirectoryServices[15]    [2012/03/07 15:44:33, 0, pid=474] /SourceCache/samba/samba-235.5/samba/source/libads/kerberos.c:ads_kinit_password(228)
07/03/2012 15:44:33    com.apple.DirectoryServices[15]      kerberos_kinit_password N240-11904$@STUDENTS.somewhere.AC.UK failed: Preauthentication failed
07/03/2012 15:44:33    com.apple.DirectoryServices[15]    [2012/03/07 15:44:33, 0, pid=474] /SourceCache/samba/samba-235.5/samba/source/libads/kerberos.c:ads_kinit_password(228)
07/03/2012 15:44:33    com.apple.DirectoryServices[15]      kerberos_kinit_password N240-11904$@STUDENTS.somewhere.AC.UK failed: Preauthentication failed
07/03/2012 15:44:33    com.apple.DirectoryServices[15]    Enter machine password:
07/03/2012 15:44:33    DirectoryService[15]    Failed to changed computer password in Active Directory domain students.somewhere.ac.uk
07/03/2012 15:44:33    com.apple.DirectoryServices[15]    [2012/03/07 15:44:33, 0, pid=479] /SourceCache/samba/samba-235.5/samba/source/libads/kerberos.c:ads_kinit_password(228)
07/03/2012 15:44:33    com.apple.DirectoryServices[15]      kerberos_kinit_password N240-11904$@STUDENTS.somewhere.AC.UK failed: Preauthentication failed
07/03/2012 15:44:34    com.apple.DirectoryServices[15]    [2012/03/07 15:44:34, 0, pid=479] /SourceCache/samba/samba-235.5/samba/source/libads/kerberos.c:ads_kinit_password(228)
07/03/2012 15:44:34    com.apple.DirectoryServices[15]      kerberos_kinit_password N240-11904$@STUDENTS.somewhere.AC.UK failed: Preauthentication failed
07/03/2012 15:44:34    com.apple.DirectoryServices[15]    Enter machine password:
07/03/2012 15:44:34    com.apple.DirectoryServices[15]    [2012/03/07 15:44:34, 0, pid=484] /SourceCache/samba/samba-235.5/samba/source/libads/kerberos.c:ads_kinit_password(228)
07/03/2012 15:44:34    com.apple.DirectoryServices[15]      kerberos_kinit_password N240-11904$@STUDENTS.somewhere.AC.UK failed: Preauthentication failed
07/03/2012 15:44:34    com.apple.DirectoryServices[15]    [2012/03/07 15:44:34, 0, pid=484] /SourceCache/samba/samba-235.5/samba/source/libads/kerberos.c:ads_kinit_password(228)
07/03/2012 15:44:34    com.apple.DirectoryServices[15]      kerberos_kinit_password N240-11904$@STUDENTS.somewhere.AC.UK failed: Preauthentication failed
07/03/2012 15:44:36    ntpd[20]    time reset +0.717779 s
07/03/2012 15:45:01    /System/Library/CoreServices/RemoteManagement/AppleVNCServer.bundle/Contents/MacOS/AppleVNCServer[91]    CGSKeyTranslateInitialize: KLGetCurrentKeyboardLayout or KLGetKeyboardLayoutProperty is not available, fall back to USA keymap
07/03/2012 15:45:09    SecurityAgent[96]    Could not get the user record for '_mac_bind' from Directory Services
07/03/2012 15:45:09    SecurityAgent[96]    User info context values set for _mac_bind
07/03/2012 15:45:09    SecurityAgent[96]    unknown-user (_mac_bind) login attempt PASSED for auditing
07/03/2012 15:45:13    SecurityAgent[96]    Could not get the user record for '_mac_bind' from Directory Services
07/03/2012 15:45:13    SecurityAgent[96]    User info context values set for _mac_bind
07/03/2012 15:45:13    SecurityAgent[96]    unknown-user (_mac_bind) login attempt PASSED for auditing


This is what happened after I woke the machine up and then tried to log in as a user called "_mac_bind". It happens with any Active Directory user.

After trying all the standard things:
  1. reset PR-RAM
  2. /sbin/fsck -yf
  3. unbind and bind again
I finally resorted to re-imaging, which actually fixed the problem, although I am not sure why.

I came back to the problem after finding it happen quite a few times and tried binding it to Active Directory with a different name (although I had my doubts). This fixed the problem.

I conclude to say that there must have been a problem on the server side. Perhaps the mac had been placed in the wrong list. My next thing to try would be to delete any instance of it on the servers and try binding it under it's old name.

After this, I would either assume someone had done something to the instance on the server, or the server had not liked the machine at one point and disallowed it.

.......

Well, I've come back to this some time later. It appears one of the Staff iMacs is now exhibiting the same behavour, but changing its Active Directory bound name does not fix it this time. So, before I re-image hopefully the Network Administrator can have a look. Here's the log for the one exhibiting this behavour:



13/03/2012 09:36:28 SecurityAgent[95] Showing Login Window
13/03/2012 09:36:28 kernel Ethernet [AppleBCM5701Ethernet]: Link up on en0, 100-Megabit, Full-duplex, No flow-control, Debug [796d,2300,0de1,0300,41e1,0000]
13/03/2012 09:36:34 configd[13] network configuration changed.
13/03/2012 09:36:36 configd[13] setting hostname to "n214a-11905.ictservicestest.somewhere.ac.uk"
13/03/2012 09:36:50 com.apple.DirectoryServices[15] Enter machine password: 
13/03/2012 09:36:52 com.apple.DirectoryServices[15] DNS update failed!
13/03/2012 09:36:56 DirectoryService[15] GSSAPI Error: Unspecified GSS failure.  Minor code may provide more information (Cannot find KDC for requested realm)
13/03/2012 09:36:56 DirectoryService[15] GSSAPI Error: Unspecified GSS failure.  Minor code may provide more information (Cannot find KDC for requested realm)
13/03/2012 09:36:57 DirectoryService[15] GSSAPI Error: Unspecified GSS failure.  Minor code may provide more information (Cannot find KDC for requested realm)
13/03/2012 09:36:57 com.apple.DirectoryServices[15] Enter machine password: 
13/03/2012 09:36:58 com.apple.DirectoryServices[15] DNS update failed!
13/03/2012 09:36:58 SecurityAgent[95] Could not get the user record for _mac_bind from DirectoryServices.
13/03/2012 09:36:58 SecurityAgent[95] Will sleep 1 seconds and try again (retryCount = 4)
13/03/2012 09:36:59 SecurityAgent[95] Could not get the user record for _mac_bind from DirectoryServices.
13/03/2012 09:36:59 SecurityAgent[95] Will sleep 2 seconds and try again (retryCount = 3)
13/03/2012 09:37:01 SecurityAgent[95] Could not get the user record for _mac_bind from DirectoryServices.
13/03/2012 09:37:01 SecurityAgent[95] Will sleep 4 seconds and try again (retryCount = 2)
13/03/2012 09:37:05 SecurityAgent[95] Could not get the user record for _mac_bind from DirectoryServices.
13/03/2012 09:37:05 SecurityAgent[95] Will sleep 8 seconds and try again (retryCount = 1)
13/03/2012 09:37:13 SecurityAgent[95] User info context values set for _mac_bind
13/03/2012 09:37:13 SecurityAgent[95] unknown-user (_mac_bind) login attempt PASSED for auditing
13/03/2012 09:37:17 SecurityAgent[95] Could not get the user record for _mac_bind from DirectoryServices.
13/03/2012 09:37:17 SecurityAgent[95] Will sleep 1 seconds and try again (retryCount = 4)
13/03/2012 09:37:18 SecurityAgent[95] Could not get the user record for _mac_bind from DirectoryServices.
13/03/2012 09:37:18 SecurityAgent[95] Will sleep 2 seconds and try again (retryCount = 3)
13/03/2012 09:37:20 SecurityAgent[95] Could not get the user record for _mac_bind from DirectoryServices.
13/03/2012 09:37:20 SecurityAgent[95] Will sleep 4 seconds and try again (retryCount = 2)
13/03/2012 09:37:24 SecurityAgent[95] User info context values set for _mac_bind
13/03/2012 09:37:26 authorizationhost[94] k5_store_ticket_in_cache(): got -1765328243 (Matching credential not found) on /SourceCache/SecurityAgent/SecurityAgent-39574/plugins/krb5/krb5_operations.c:115
13/03/2012 09:37:26 SecurityAgent[95] Login Window Showing Progress
13/03/2012 09:37:26 authorizationhost[94] ERROR | -[HomeDirMounter mountNetworkHomeWithURL:attributes:dirPath:username:] | PremountHomeDirectoryWithAuthentication( url=smb://faraday.students.somewhere.ac.uk/FaradayStudents, homedir=/Network/Servers/faraday.students.somewhere.ac.uk/FaradayStudents/_mac_bind, name=_mac_bind ) returned 45
13/03/2012 09:37:53 DirectoryService[15] GSSAPI Error: Unspecified GSS failure.  Minor code may provide more information (Cannot find KDC for requested realm)
13/03/2012 09:37:53 SecurityAgent[95] Could not get the user record for '_mac_bind' from Directory Services
13/03/2012 09:37:53 SecurityAgent[95] User info context values set for _mac_bind
13/03/2012 09:37:53 SecurityAgent[95] unknown-user (_mac_bind) login attempt PASSED for auditing
13/03/2012 09:38:04 SecurityAgent[95] Could not get the user record for _mac_bind from DirectoryServices.
13/03/2012 09:38:04 SecurityAgent[95] Will sleep 1 seconds and try again (retryCount = 4)
13/03/2012 09:38:05 SecurityAgent[95] Could not get the user record for _mac_bind from DirectoryServices.
13/03/2012 09:38:05 SecurityAgent[95] Will sleep 2 seconds and try again (retryCount = 3)
13/03/2012 09:38:07 SecurityAgent[95] Could not get the user record for _mac_bind from DirectoryServices.
13/03/2012 09:38:07 SecurityAgent[95] Will sleep 4 seconds and try again (retryCount = 2)
13/03/2012 09:38:11 SecurityAgent[95] Could not get the user record for _mac_bind from DirectoryServices.
13/03/2012 09:38:11 SecurityAgent[95] Will sleep 8 seconds and try again (retryCount = 1)
13/03/2012 09:38:19 SecurityAgent[95] User info context values set for _mac_bind
13/03/2012 09:38:19 SecurityAgent[95] unknown-user (_mac_bind) login attempt PASSED for auditing
13/03/2012 09:38:24 SecurityAgent[95] User info context values set for cove
13/03/2012 09:38:25 SecurityAgent[95] Login Window Showing Progress
13/03/2012 09:38:26 SecurityAgent[95] Login Window done
13/03/2012 09:38:26 loginwindow[31] Login Window - Returned from Security Agent

Just for comparison, here is a log for a 'normal' machine:

13/03/2012 08:30:40 configd[13] network configuration changed.
13/03/2012 08:30:40 configd[13] setting hostname to "n219-002225"
13/03/2012 08:30:41 blued[17] writeExtendedInquiryResponse returned 105
13/03/2012 08:30:41 com.apple.SystemStarter[22] Starting Qmaster services
13/03/2012 08:30:43 com.apple.DirectoryServices[15] Enter machine password: 
13/03/2012 08:30:43 com.apple.SecurityServer[25] Session 0x30a460 created
13/03/2012 08:30:43 com.apple.SecurityServer[25] Session 0x30a460 attributes 0x30
13/03/2012 08:30:44 loginwindow[31] Login Window Started Security Agent
13/03/2012 08:30:45 WindowServer[68] kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
13/03/2012 08:30:45 com.apple.WindowServer[68] Tue Mar 13 08:30:45 n219-002225 WindowServer[68] : kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
13/03/2012 08:30:45 TabletDriver[99] Finish launching /Library/Application Support/Tablet/PenTabletDriver.app/Contents/Resources/ConsumerTouchDriver.app
13/03/2012 08:30:45 com.wacom.pentablet[99] TabletDriver[99]: Finish launching /Library/Application Support/Tablet/PenTabletDriver.app/Contents/Resources/ConsumerTouchDriver.app
13/03/2012 08:30:45 SecurityAgent[105] Showing Login Window
13/03/2012 08:30:45 TabletDriver[99] Finish launching /Library/Application Support/Tablet/PenTabletDriver.app/Contents/Resources/TabletDriver.app
13/03/2012 08:30:45 com.wacom.pentablet[99] TabletDriver[99]: Finish launching /Library/Application Support/Tablet/PenTabletDriver.app/Contents/Resources/TabletDriver.app
13/03/2012 08:30:45 com.apple.DirectoryServices[15] DNS update failed!
13/03/2012 08:30:47 com.apple.DirectoryServices[15] Enter machine password: 
13/03/2012 08:30:48 com.apple.DirectoryServices[15] DNS update failed!
13/03/2012 08:30:55 root[125] sntp options: a=2 v=1 e=0.100 E=5.000 P=2147483647.000
13/03/2012 08:30:55 root[125]    d=15 c=5 x=0 op=1 l=/var/run/sntp.pid f= time.euro.apple.com
13/03/2012 08:30:55 root[125] sntp: not enough valid responses received in time
13/03/2012 09:46:27 /System/Library/CoreServices/RemoteManagement/AppleVNCServer.bundle/Contents/MacOS/AppleVNCServer[106] Authentication: SUCCEEDED :: User Name: cove :: Viewer Address: 172.25.3.128 :: Type: DH
13/03/2012 09:46:42 SecurityAgent[105] User info context values set for _mac_bind
13/03/2012 09:46:43 authorizationhost[104] k5_store_ticket_in_cache(): got -1765328243 (Matching credential not found) on /SourceCache/SecurityAgent/SecurityAgent-39574/plugins/krb5/krb5_operations.c:115
13/03/2012 09:46:43 edu.mit.Kerberos.CCacheServer[148] launchctl start error: No such process
13/03/2012 09:46:44 SecurityAgent[105] Login Window Showing Progress
13/03/2012 09:46:49 gssd-agent[153] Could not canonicalize our host name in kerberos_init
13/03/2012 09:46:55 mcxalr_agent[165] Listener client (pid: 165) entering listen mode for uid: 2069522553
13/03/2012 09:46:55 SecurityAgent[105] Login Window done
13/03/2012 09:46:55 loginwindow[31] Login Window - Returned from Security Agent
13/03/2012 09:46:55 com.apple.loginwindow[31] LoginHook: Executing /etc/hooks/LIclean.hook...
13/03/2012 09:46:55 root[173] LoginHook: Starting for _mac_bind
13/03/2012 09:46:56 kernel mcxalr{0} 32-bit  Build date: Feb  3 2010 19:02:48
13/03/2012 09:46:56 kernel mcxalr{1} Started
13/03/2012 09:46:56 kernel mcxalr{2} Management ENABLED for uid: 2069522553
13/03/2012 09:46:56 kernel calling mpo_policy_init for mcxalr
13/03/2012 09:46:56 kernel Security policy loaded: MCX App Launch (mcxalr)
13/03/2012 09:46:56 kernel mcxalr{3} Auth provider registered.  connection: 1  uid: 2069522553  version: 1
13/03/2012 09:46:56 com.apple.loginwindow[31] ls: /Network/Servers/faraday.students.somewhere.ac.uk/FaradayStudents/_mac_bind/Library/Caches: No such file or directory
13/03/2012 09:46:56 com.apple.loginwindow[31] usage: chmod [-fhv] [-R [-H | -L | -P]] [-a | +a | =a  [i][# [ n]]] mode|entry file ...
13/03/2012 09:46:56 com.apple.loginwindow[31] chmod [-fhv] [-R [-H | -L | -P]] [-E | -C | -N | -i | -I] file ...
13/03/2012 09:46:56 com.apple.loginwindow[31] ls: /Network/Servers/faraday.students.somewhere.ac.uk/FaradayStudents/_mac_bind/Library/Fonts: No such file or directory
13/03/2012 09:46:56 com.apple.loginwindow[31] usage: chmod [-fhv] [-R [-H | -L | -P]] [-a | +a | =a  [i][# [ n]]] mode|entry file ...
13/03/2012 09:46:56 com.apple.loginwindow[31] chmod [-fhv] [-R [-H | -L | -P]] [-E | -C | -N | -i | -I] file ...
13/03/2012 09:46:56 com.apple.loginwindow[31] ls: /Network/Servers/faraday.students.somewhere.ac.uk/FaradayStudents/_mac_bind/Library/Application Support/SMART Technologies Inc/Gallery: No such file or directory
13/03/2012 09:46:56 com.apple.loginwindow[31] usage: chmod [-fhv] [-R [-H | -L | -P]] [-a | +a | =a  [i][# [ n]]] mode|entry file ...
13/03/2012 09:46:56 com.apple.loginwindow[31] chmod [-fhv] [-R [-H | -L | -P]] [-E | -C | -N | -i | -I] file ...
13/03/2012 09:46:56 com.apple.loginwindow[31] cp: /Users/cove/Library/Application Support/Microsoft/Office: No such file or directory
13/03/2012 09:46:57 com.apple.loginwindow[31] mkdir: /Network/Servers/faraday.students.somewhere.ac.uk/FaradayStudents/_mac_bind/Movies/iMovie Events: File exists
13/03/2012 09:46:57 com.apple.loginwindow[31] mkdir: /Network/Servers/faraday.students.somewhere.ac.uk/FaradayStudents/_mac_bind/Movies/iMovie Projects: File exists
13/03/2012 09:46:57 com.apple.loginwindow[31] mkdir: /Network/Servers/faraday.students.somewhere.ac.uk/FaradayStudents/_mac_bind/Library/Application Support/Microsoft: File exists
13/03/2012 09:46:57 com.apple.loginwindow[31] ln: /Network/Servers/faraday.students.somewhere.ac.uk/FaradayStudents/_mac_bind/Library/Application Support/SMART Technologies Inc/Gallery
13/03/2012 09:46:57 com.apple.loginwindow[31] : No such file or directory
13/03/2012 09:46:57 root[242] - LoginHook:  Finished for _mac_bind
13/03/2012 09:46:57 loginwindow[31] USER_PROCESS: 31 console
13/03/2012 09:46:57 com.apple.UserEventAgent-LoginWindow[95] ALF error: cannot find useragent 1102
13/03/2012 09:46:57 com.apple.UserEventAgent-LoginWindow[95] plugin.UserEventAgentFactory: called with typeID=FC86416D-6164-2070-726F-70735C216EC0
13/03/2012 09:46:57 com.apple.launchd[1] ([0x0-0x5005].com.wacom.Consumer_TouchDriver[112]) Exited with exit code: 255
13/03/2012 09:46:57 com.apple.launchd.peruser.2069522553[146] (com.apple.ReportCrash) Falling back to default Mach exception handler. Could not find: com.apple.ReportCrash.Self
13/03/2012 09:46:57 com.apple.launchd[1] (com.wacom.pentablet[99]) Exited with exit code: 255
13/03/2012 09:46:59 mds[29] (Normal) DiskStore: Rebuilding index for /Network/Servers/faraday.students.somewhere.ac.uk/FaradayStudents/_mac_bind
13/03/2012 09:47:00 mds[29] (Normal) DiskStore: Creating index for /Network/Servers/faraday.students.somewhere.ac.uk/FaradayStudents/_mac_bind
13/03/2012 09:47:04 com.apple.launchd.peruser.2069522553[146] (com.apple.Kerberos.renew.plist[261]) Exited with exit code: 1
13/03/2012 09:47:05 ServerScanner[257] Not scanning because node /LDAPv3/xserve.somewhere.ac.uk is in searchPath
13/03/2012 09:47:07 MacClient[272] Starting UniFLOWMacClient
13/03/2012 09:47:08 Adobe Acrobat Updater Helper[267] Adobe Acrobat Updater encountered errorCode 1504
13/03/2012 09:47:09 MacClient[272] ID: 2 Request url 'http://gutenberg.students.somewhere.ac.uk/pwclient/logon/logonmacuser.asp?MachineName=_mac_bind&ClientType=1' with timeout 90.000000
13/03/2012 09:47:10 MacClient[272] ID: 2 Request url 'http://gutenberg.students.somewhere.ac.uk/pwclient/isapi/momntfy.dll?RunEventLoop?Handle=250' with timeout 90.000000


The only differences between these two machines are the fact that they are on different VLANs. The mac with the problem is on a special MAC VLAN, and the other is not.

Coincidentaly, I've only seen the problem on Mac's on this specific VLAN? Might be a coincidence as half of them are on the VLAN, soon to be all.

I shall update this. If anybody has any ideas please reply.




Update:


So, still no luck but lots more logs. Not sure if I'm going to post them all as it seems like a lot of data. Anyway, I ran out of time and had to re-image. It's working now. I shall update this when I find another machine with the same issues.