Odd computer names

jarednichols
Honored Contributor

Hi-

I've got a machine in my inventory called

{<BR> Network {<BR> HostNames {<BR>
and one called

2009-10-23 16:10:37.289 defaults[319] The domain/default

Has anyone seen something like this before? Before I contact the user, I wanted to see if there was anything I could do on the service side of things. I ran a recon remotely and the names are still sticking. Should I delete them from the JSS and let them check in again?
---
Jared F. Nichols
Desktop Engineer, Infrastructure & Operations
Information Services Department
MIT Lincoln Laboratory
244 Wood Street
Lexington, Massachusetts 02420
781.981.5436

12 REPLIES 12

stevewood
Honored Contributor II
Honored Contributor II

You're right, that is exactly how it works, but it relies on that
preferences.plist file. This came directly from JAMF, although I can't
remember which engineer it was that helped me with the case.

I'm working through the Casper 7 compiles myself, but I'm seeing a problem
setting the first user. It doesn't seem to want to set. Still testing, and
if I come across anything I'll post to the list.

Steve Wood
Director of IT
swood at integer.com

The Integer Group | 1999 Bryan St. | Ste. 1700 | Dallas, TX 75201
T 214.758.6813 | F 214.758.6901 | C 940.312.2475

Not applicable

I have seen the same issue with compiles running 7.0.1 it never creates the first account. I am still testing as well.

On 10/27/09 3:09 PM, "Steve Wood" <swood at integer.com> wrote:

You're right, that is exactly how it works, but it relies on that preferences.plist file. This came directly from JAMF, although I can't remember which engineer it was that helped me with the case.

I'm working through the Casper 7 compiles myself, but I'm seeing a problem setting the first user. It doesn't seem to want to set. Still testing, and if I come across anything I'll post to the list.

Steve Wood
Director of IT
swood at integer.com

The Integer Group | 1999 Bryan St. | Ste. 1700 | Dallas, TX 75201
T 214.758.6813 | F 214.758.6901 | C 940.312.2475

On Tue, Oct 27, 2009 at 1:55 PM, Thomas Larkin <tlarki at kckps.org> wrote:

During imaging you can set the name with Casper though or you can grab the name of the machine currently. The name during the image, should name it properly.

I never used instaDMG as I did not like the time it took to build a pristine image, I could do it the old way faster. I am trying Casper 7 complies now though.

tlarkin
Honored Contributor

How are you all creating the accounts? I am going to do a post image shell script that creates all the accounts that way all I ever need to modify is a script.

stevewood
Honored Contributor II
Honored Contributor II

I'm just using the configuration right now to do the initial admin account.
You know, in Casper Admin setting the Management tab of the configuration.
That doesn't work for me. And I've even done a post image script that adds
a hidden user, and that user is not on there either.

Like I said, still testing.

Steve Wood
Director of IT
swood at integer.com

The Integer Group | 1999 Bryan St. | Ste. 1700 | Dallas, TX 75201
T 214.758.6813 | F 214.758.6901 | C 940.312.2475

tlarkin
Honored Contributor

I have seen this before too, which is why I came up with my keep name solution I posted on the list about a month ago. It works as intended but there are a few caveats to it. You must ensure that the name is set right during imaging, then this won't happen.

If you want I can send the info to you off the list since it is on my site.

-Tom

Not applicable

Hey Al-

We get this same thing too. We would be interested in that fix script too.

Thx
Jon

tlarkin
Honored Contributor

It is a two part script.

The first script is meant to run after imaging, and it will write the name to a file in /Library/Receipts. This file will contain the computer name from when it was imaged. The second script you run as a policy via Casper that can run say, once a day for example. If you check the box that says make this policy available off line it will cache the script to the machine and run it at start up or once a day. The second script checks the file in /Library/Receipts and if the name matches it exits, if the name doesn't match the computer gets renamed to what it should be.

The only thing I didn't add was a recon to update inventory but you could easily add that to my scripts

My script is a bit redundant because I haven't tossed it into production yet, just tested it out in my test environment. However, it has worked for me as advertised. So, please make sure you test it, and you could probably even make it smaller. You can drop the touch command since > will create the file if it doesn't exist and you can probably drop the ownership and permissions commands. I just put them in there because I was still testing it and wanted to make sure certain things were there. If Casper creates a file I am sure Casper does it as root.

http://tlarkin.com/tech/2-shell-scripts-maintain-standard-naming-conventions

So, copy and paste both scripts in your favorite text editor, then upload them to the JSS. Make the first script run after post imaging, and the second script to run once a day and make it available off line. It will cache the second script to the machine locally and it will execute once every day. Now, when you image a machine ensure that the name is set properly, because if it is not then it will cache the wrong name to that receipt file.

You could also technically accomplish this with out Casper and use launchd, but Casper puts the easy button on it.

-Tom



Thomas Larkin
TIS Department
KCKPS USD500
tlarki at kckps.org
blackberry: 913-449-7589
office: 913-627-0351
chown -R us /.base

Not applicable

Thanks. We'll give this a whirl and see how it goes.

stevewood
Honored Contributor II
Honored Contributor II

I was seeing this issue when imaging machines. The machine would not get
re-named properly during the reboot and would end up with that name. The
problem was traced back to the fact that I was using an InstaDMG image that
had never been booted to image the machine with. It turns out that Casper
looks for the preferences.plist file in
/Library/Preferences/SystemConfiguration. That is the file that holds the
machine name. If that file is not present, Casper will not rename the
machine.

My solution: build a package that drops a generic preferences.plist file
into that directory. Problem solved.

Steve Wood
Director of IT
swood at integer.com

The Integer Group | 1999 Bryan St. | Ste. 1700 | Dallas, TX 75201
T 214.758.6813 | F 214.758.6901 | C 940.312.2475

tlarkin
Honored Contributor

During imaging you can set the name with Casper though or you can grab the name of the machine currently. The name during the image, should name it properly.

I never used instaDMG as I did not like the time it took to build a pristine image, I could do it the old way faster. I am trying Casper 7 complies now though.

Kedgar
Contributor

I'm using Casper 7.1... I use InstaDMG and have not had the problems with
naming. My admin account is created by the configuration, however it does
not add the account to the _lpadmin group. On afp548.com, there is a
package you can edit that creates accounts for you. You can put it in your
configuration, or use it in instadmg. I think it's simply called 'Create
User'. I may go back to using that, or using my own script.

tlarkin
Honored Contributor

Well part of the problem is the end user changing the name and messing
up my smart groups, so I put a stop to that. They can rename it all
they want but it gets forced back.

I was jacking around with MCX trying to make that one thing root only,
but it was a lot of work and it would break functionality of some local
admin accounts.