Skip to main content
Solved

Casper Imaging 8.6 Not Naming Computer

  • August 10, 2012
  • 119 replies
  • 604 views

Forum|alt.badge.img+21

Casper Version 8.6
Mountain Lion

Although I have specified the computer name in the field for Casper Imaging and updated the information on the JSS with the checkmark as well, after imaging a system I notice that the computer has no name, all I get is localhost. Anyone else seen this issue?

Best answer by ernstcs

As I understand it, there may be hope in the next version of the Casper Suite to put this issue to rest...for now. In the mean time, although you all have some wonderful ways of doing this, I went an even more different route since I bind to AD and that part of the FirstRun works every time since the bind script in FirstRun uses the name in the script. =D

It's probably a terrible way to do it, but I read the computer name out of the AD settings at whatever point works and then pass that through to scutil. I found it more reliable to have a simple script part of first run that calls a custom triggered policy. The policy it calls installs a self-deleting StartupItem with the script below. After FirstRun finishes and reboots, the StartupItem runs and does the rest and then cleans itself up. You wouldn't need to output it to a file like I do, that I use for later reboots where another StartupItem renames the computers back to what they were when they were imaged to maintain the same name, you know the stupid (1) and (2) after the names, etc. I run another enroll command to make sure it does, that's been spotty as hell, too.

TEST TEST TEST, and if you have any questions, let me know. Thanks for all the responses folks!

YOU MUST CHANGE your plist file name, since it won't be UWEC like mine. Also, if you have a preference on computer name case, you'll have to work around that, too.

#!/bin/sh

## Delete an existing computername.conf file if it already exists
if [ -f /private/var/computername.conf ]; then

    /bin/rm /private/var/computername.conf
fi

## Create new computername.conf file using AD binding information, and then set the computer name
if [ -f /Library/Preferences/OpenDirectory/Configurations/Active Directory/UWEC.plist ]; then

    defaults read /Library/Preferences/OpenDirectory/Configurations/Active Directory/UWEC.plist trustaccount | sed '$s/.$//' > /private/var/computername.conf

    set_name=`/bin/cat /private/var/computername.conf`

    /usr/sbin/scutil --set ComputerName $set_name

    /usr/sbin/scutil --set LocalHostName $set_name

   jamf enroll
fi

119 replies

Forum|alt.badge.img+18
  • Esteemed Contributor
  • August 10, 2012

EDIT:The below used to be true but now looks like you may need to remove /Library/Preferences/SystemConfiguration/preferences.plist after you target this machine to another to capture it (as it will recreate this file each time you reboot).

Original Post (may not still be correct in 8.64)
Did you remove the system configurations folder from the machine? Since Casper Imaging uses the preferences in this folder to write the name, if its been removed the naming will only create localhost or blank.

You may need to rebuild your base image and leave the system configuration folder in place.

/Library/Preferences/SystemConfiguration is the path.

Gabe Shackney
Princeton Public Schools


Forum|alt.badge.img+3
  • New Contributor
  • August 10, 2012

Are you using PreStage Imaging in Casper? If you are, you can add the computer name(s) there. It works slick.
I imaged 450+ computers and they all had the name applied.


Forum|alt.badge.img+21
  • Author
  • Contributor
  • August 10, 2012

The SystemConfiguration folder is intact.

We do not use PreStage imaging here. I'm guessing that would not help though, if naming the system right in Casper Imaging can't do it I imaging the same would occur when it tries to pull it from the JSS automatically during prestage imaging.


Forum|alt.badge.img+16
  • Honored Contributor
  • August 10, 2012

Yes, I have see this. I had to create a rename script and bind at AD script to solve the issue. I was also seeing super long names generated by our DNS. At reboot I reset the name and then rebind to AD. Same a Casper does/did but I just bind to AD last. I control the order of the process, buy the names of the scripts

I do not delete /Library/Preferences/SystemConfiguration in X.8 however I was in X.7 as there was a bug with network ports.

I use a pre-stage set up


Forum|alt.badge.img+21
  • Author
  • Contributor
  • August 10, 2012

This is for sure an issue with just 10.8. I tried two different systems and they both do it, can't name the box for 10.8, but name it just fine with 10.7. I shouldn't have to create a script to get around this.

Performing these commands after the fact work of course and just leads me to believe it's a bug in imaging, but I figured a bunch more people would have noticed it and posted already, or just the opposite and said they've imaged ML with proper naming just fine.

/usr/sbin/scutil --set ComputerName <name>

/usr/sbin/scutil --set LocalHostName <name>


Forum|alt.badge.img+3
  • New Contributor
  • August 11, 2012

I'm also having the exact same issue. I've imaged almost 130 Macs to OS X 10.8 with Casper 8.6 and only one has renamed sucessfully. But because school is starting back very soon, I have not had the time to troubleshoot the issue.

Also the computers will bind to AD with the name "no name". Which I found rather amusing.


Forum|alt.badge.img+21
  • Author
  • Contributor
  • August 11, 2012

I put in a support call on Friday for this, and I'll post what I get back for information.


Forum|alt.badge.img+7
  • Contributor
  • August 12, 2012

Seeing this as well, on 10.7.

Am going to try and narrow down exactly when it does happen.

Matt


Forum|alt.badge.img+9
  • Contributor
  • August 13, 2012

Are you all just using plain text computer names? Are there any special characters like hyphens, underscores or spaces?

I'm testing imaging a 10.8 client here and am having no trouble renaming it or binding it to AD.

Patrick


Forum|alt.badge.img+21
  • Author
  • Contributor
  • August 13, 2012

Both cases. I've tested on a system that has a hyphen in the name, and one that just has letters and numbers.

MAC-OL1108-SP1
LTS2653531x


Forum|alt.badge.img+21
  • Author
  • Contributor
  • August 13, 2012

Patrick,

What is your imaging partition setup look like? Are you imaging from a partition that's 10.8, logged in as root or another user, are you using netboot, netinstall? What's the details of your imaging process.

Right now I'm on a separate partition with 10.8 running as root imaging. Wasn't sure if the issue was in where people are imaging from.


Chris_Hafner
Forum|alt.badge.img+27
  • Jamf Heroes
  • August 13, 2012

I'll jump on the band wagon here. I'm experiencing the very same issue (v8.6 and 10.8). Everything imaged to 10.7 or below names just fine. Anything imaged to 10.8 simply doesn't get named and proceeds to identify itself as localhost. Naming them via JSS and letting my inventory process rename the unit has only met with mixed results. Unfortunately, I've not yet been able to analyze the issue as I've been under a tremendous work load. I'm really glad this discussion came up. I was half way through starting one on friday but got caught up and didn't want to get one going without more results. Fortunately for me it's not dire, but severely inconvenient.

When we name units they are named in the following manner
BA-Department-FirstName LastName


Forum|alt.badge.img+9
  • Contributor
  • August 13, 2012

Craig

I'm imaging from a NetBoot set, which is running 10.8 and casper imaging 8.6. The NetBoot set logs in as root.


Forum|alt.badge.img+3
  • New Contributor
  • August 13, 2012

My NetBoot image is also running Mac OS X 10.8 and Casper Imaging 8.6. It Auto-logs as root.


Chris_Hafner
Forum|alt.badge.img+27
  • Jamf Heroes
  • August 14, 2012

Ditto


Forum|alt.badge.img+16
  • Valued Contributor
  • August 14, 2012

We are seeing the same (non-naming) when deploying a 10.8 base though our set-up is different. Our NetBoot image is running OS 10.7.4 and using Casper Imaging 8.52. It Auto-logs in as root.


Forum|alt.badge.img+13
  • Contributor
  • August 14, 2012

pretty much the same thing here with a 10.8 net boot set + 8.6 tools installed on it.

10.8 machines fail to set the hostname. 10.7.x may fail also, though i'd have to check.

in my case, i'm installing 10.8 via a pkg, so i don't necessarily expect the machines to set their names on the actual first boot. i do kick off a first boot routine after the 10.8 install that should mimic the standard jamf stuff, though.


thomasC
Forum|alt.badge.img+10
  • Contributor
  • August 14, 2012

JSS 8.6 10.8 NetBoot
10.8 Image
Name gets wiped. ---
No issue with 10.7 NetBoot 10.7.4 Image
10.6.8 Image
---
Anyone contact JAMF?


Forum|alt.badge.img+21
  • Author
  • Contributor
  • August 14, 2012

Yes, I have a support call in for it. Likely a defect to come. I will keep you all posted.


Forum|alt.badge.img+21
  • Author
  • Contributor
  • August 14, 2012

From JAMF:

Hello. I have spoke with development regarding this issue as we have seen it at times in our environment as well. This is an issue with the contents of the:

/Library/Preferences/SystemConfiguration/preferences.plist

following a reboot after laying down an image.

Though the preferences.plist is properly configured with the name we set prior to a reboot, when we boot to that partition at some point the preferences.plist is converted to mangled data thus reverting the name to localhost. This appears to be an Apple issue and we have filed a Radar defect with Apple regarding this error.

We encourage you to inform jamfnation if you would like, as well as file a radar defect of your own. To see the issue we can image, and not select to reboot, at that point you can check out the preferences.plist, and after reboot check it out once again. We have seen that prior to a reboot the .plist will be configured properly by Casper, but the reboot causes a mangling for some reason.


Forum|alt.badge.img+1
  • New Contributor
  • August 16, 2012

Have same issue in our new environment. Opting to peruse with 8.6 and not re-image as currently expecting new macs with 10.8 arriving we just enrol as part as a pre-imaginging config. However, we are also seeing the Department and Building attributes from the configuration not being set either? Anyone else?


thomasC
Forum|alt.badge.img+10
  • Contributor
  • August 19, 2012

In testing I haven't found an issue imaging with the following.
-----
JSS 8.6 NBI 10.8 Casper Imaging.app 8.5.2 OS 10.8 in configuration
-----
Spotlight - works Computer Name - as entered during imaging.
LocalHostName - is set to ComputerName as expected
HostName - not set
Note: system was not in JSS prior to imaging
-----
Need to talk to JAMF and see if this has been tested and could be a work around.

Anyone else try this?


Chris_Hafner
Forum|alt.badge.img+27
  • Jamf Heroes
  • August 20, 2012

I'm on Casper imaging 8.6 unfortunately. Though, I've suspected the imaging app from the beginning.

EDIT--- see post below.


Chris_Hafner
Forum|alt.badge.img+27
  • Jamf Heroes
  • August 23, 2012

I just tried making a netboot image using the above configuration.
JSS 8.6 NBI 10.8 Casper Imaging.app 8.5.2 OS 10.8 in configuration

However, the units are still not being named. I've tried with units that are not in the JSS and units that are. Unit's that I've deleted and units that I've named in the JSS inventory specifically to see if the inventory process would re-name it after. What I discovered was that, at least with 8.5.2 imaging it actually removed the name from the inventory!

This is a serious issue for us as I will be pre-staging almost 500 computers in two weeks and I only get one day to do it. Easy enough, but having to sort out the names is really going to burn my rear.


Forum|alt.badge.img+21
  • Honored Contributor
  • August 23, 2012

Really not happy started going a bit nuts at Thursby thinking their new ADmitMac 7 was at fault! Now I'm thinking it damn Casper 8.6!

This indeed annoying as my machines won't bind to AD!