Computer name irregularities ie jsmith123456 now showing jsmith123456 (2)

Not applicable

We have a fairly extensive environment as far as our network infrastructure goes and we are not really sure if this is the cause of the computer names in JAMF being manipulated. When we assign computer names we use the users id with the asset number of the device. Example jsmith123456

What we are experiencing is that in JAMF it will show jsmith123456 and the next time they boot up the name will change to jsmith123456 (2) then jsmith123456 (3) some are as high as (9). With things so segregated it is hard for me to test my theory that it is a DHCP clustering behind a VIP issue. My thought is that the system creates a record on one DHCP server and it is replicated as it should be then the next time the system comes back on to the network it receives its DHCP from another server but since the record exists and somehow it isn’t (not sure) recognizing the system as the same so it creates a new record in DHCP and it assigns it a number. My second guess is that it is receiving different IP addresses and DNS is creating multiple records and is the cause of it. Again our DNS environment is similar to the DHCP being clustered and VIP(ed)

I admit I could be completely off on this but I was hoping that maybe someone else is having or had the same issue and can point me down the right path before I sit in hours of meetings trying to see if we can get one part of the network team to try something different to correct this.

26 REPLIES 26

ernstcs
Contributor III

And just to make sure I give credit where it is due. I actually do do what
Tom Larkin does, just a little differently. I use a modified version of his
script that is SH and uses the scutil command to set the name.

Thanks again, Tom!

Craig E

Kedgar
Contributor

Speaking of scutil, does anyone set hostname? It's not set by default,
anyone see a reason why or why not to use it?

Sent from Ken's iPhone

Bukira
Contributor

I have the exact same issue

Sent from my iPad

donmontalvo
Esteemed Contributor III

You guys just saved me a couple hours work. I thought I made a mistake in my BaseImage. :)

I'm seeing the same problem. The computer I created the image on is showing up as the "XXXXXXXXX (2)" dialog when I NetBoot an image. The quoted string is the serial number of the computer I created the image on.

Don

--
https://donmontalvo.com

donmontalvo
Esteemed Contributor III

You guys just saved me a couple hours work. I thought I made a mistake in my BaseImage. :)

I'm seeing the same problem. The computer I created the image on is showing up as the "XXXXXXXXX (2)" dialog when I NetBoot an [EDIT] computer [/EDIT]. The quoted string is the serial number of the computer I created the image on.

Don

--
https://donmontalvo.com

dderusha
Contributor

Grant-

We have seen this on a few of our macs, around 3 or so.

I go to the mac, change the sharing name back to what it should be...and go to casper and do the same.
then I recon, and a few of them have not gone back to the (#)
One specifically we have not figured out is on (47)....He also travels a lot.

We have apple DHCP servers running 10.4 which we are in the process of upgrading to 10.6.4

What supplies your DHCP service?

Dan

Not applicable

We have windows servers running DHCP. It is not affecting all Macs just
some. And we find with those few that they take a long time to login to the
network (AD)

- Grant

Not applicable

Sorry for the second note. It just came to mind the second I let go of the
send button. Have you tried renaming out of JSS as in correct the name on
JSS and then push it down using remote? I wasn't sure you decided to do the
process manually for a reason because of it maybe going back to the (N)???

- Grant

tlarkin
Honored Contributor

I have a set of scripts that will maintain naming convention at boot
up. The problem is though is that once recon runs it will update the
name in the JSS. So you have 1 script run post image and it will
"cache" the name to a file and then an offline policy will run a script
every start up and compare the current name to the cache file and if it
is not the same it will rename the computer accordingly.

I never got to implement it due to time but I have tested it thoroughly
and it worked

Not applicable

That works but I don’t want to just cover problems. I want to know what the actual cause and solution to this is.

- Grant

On 8/5/10 10:38 AM, "Thomas Larkin" <tlarki at kckps.org> wrote:

I have a set of scripts that will maintain naming convention at boot up. The problem is though is that once recon runs it will update the name in the JSS. So you have 1 script run post image and it will "cache" the name to a file and then an offline policy will run a script every start up and compare the current name to the cache file and if it is not the same it will rename the computer accordingly.

I never got to implement it due to time but I have tested it thoroughly and it worked

Not applicable

Update.

It seems to be working updating the names on JSS then using remote to reset
the names and then recon. It only took 5 minutes to correct all 46 records
and searched for ( in remote allowing me to select all of the ones with
funky names. So far all of my test users have rebooted several times and
logged in and have experienced less of a delay connecting to AD and the name
has stayed the same. I expect to keep seeing this issue pop up with new
machines in the future. Hope one of us figure out what the true cause is.

Strange!

I am starting to wonder if the name is messing with either DNS/AD slowing
down the login times.

- Grant

dderusha
Contributor

Grant-

at first I thought I had the same computer name on the network. Once I made sure this computer was the only one using the network name, I changed it on the mac's Sharing pane manually. Then it came back.... So I thought maybe casper was pushing the name down to the mac. Next I changed it on casper and changed it on the workstation to be jack1234. Last step was to recon. Since then I have been watching casper to see if it comes back on this specific mac, and it has not in 3 weeks.

I have one powerbook that is still an issue, and the guy travels a lot. He's here today, I'll try the above method again and get back to you.

ernstcs
Contributor III

Grant,

I hear ya, and I have this problem in many places around campus as well, and
I still don't know what causes it. I haven't done what Tom has, although I
was tempted. I actually have a package that I use at imaging time that
creates some files locally on the box I can refer to.

One of the scripts just creates a file with the computer name in it from
when it was imaged so it's always what was intended unless a mistake was
made during imaging. Several have requested a feature to have the JSS
actually correct names on its own, but that is not here yet. I was also
trying to think of how I could do that with extended attributes. I know that
I can get the name into the JSS in a field, but then I'd have to have a
script to somehow get it out of there for that system.

The second file created actually parses out the JSS Computer ID of that
system from the end of the recon command and places it in a file. I use that
for other various scripts that work in our web applications here so I know
exactly WHICH machine I'm working with versus trying to trust names or
anything else.

I will have a policy that will have the machines that show up with (X) and
run a script against the file located on the box itself so it will always be
right, even if the last recon screwed it up in the JSS.

Not sure if anyone would find this helpful, I can share them if people would
like.

Craig E

dderusha
Contributor

I know you can't have two devices on the same network with the same sharing name.
without making it a big deal, the (#) gets generated at the end of the sharing name to make it unique.

Please do not print this e-mail unless you really need to.

ernstcs
Contributor III

You always have to keep in mind the order of things.

- When recon runs it will update the computer name in the JSS to what the
machine has

- If you want recon to fix the name in the JSS you first must correct the
name on the computer then recon

- You can fix the name in the JSS manually and then run a Remote session or
Policy to Fix Computer Name(s), BUT that has to run before the next recon
updates the computer name to something wrong again

And again, yes would be nice to know why though.

Craig E

Not applicable

That's why we use the username+asset tag for generating computer names to
prevent this from happening. They are unique no matter how many computers we
bring in even under a single user.

- Grant

dderusha
Contributor
On Aug 5, 2010, at 1:45 PM, Ernst, Craig S. wrote: You always have to keep in mind the order of things. - When recon runs it will update the computer name in the JSS to what the machine has - If you want recon to fix the name in the JSS you first must correct the name on the computer then recon - You can fix the name in the JSS manually and then run a Remote session or Policy to Fix Computer Name(s), BUT that has to run before the next recon updates the computer name to something wrong again

makes sense why my traveler has the issue still......I changed it on casper, but not his workstation because he is never here.......

tlarkin
Honored Contributor

hostname is what MDNSResponder will use to search out local names of computers on the local subnet. It is part of how bonjour searches for other devices on the network. Now, if there are two of the same Mac computers on the same subnet, one will automatically give itself another number (2) just like if you have two volumes mounted on your Mac with the same name.

This will freak out the MS Networking client since it has to use Unique names. Where as Unix doesn't care about computer names, it more so cares about hardware IDs, and it will also use UUIDs generated by machines as well. So, if you are in a mixed environment you may experience (this is me totally guessing here as I run pure OD, with some SuSe eDirectory on the side) some anomalies with the client wanting to give itself a unique name?

So, make sure there are no duplicate names amongst your machines. Also, if you allow simultaneous log ins and use a log in hook to set the name since the user's name is included in the name, perhaps it is getting over written?

I learned that certain users in my deployment with access to the sharing pane liked to name their computer things like G-Money$ or BigDaddy (seriously they did) and since these users have rights to those features of OS X, they can do so. It can get political too, when dealing with people who are twice above your pay scale.

So, I just came up with a solution that let them change it but every time they rebooted it got changed back via an off line policy with a simple shell script. Most of the time they won't ever know, and therefore they never go back to change it again.

There were lots of changes in 10.6 to MDNSResponder and how it handles DNS as well as Bonjour, and I am still running 10.5 so I am just speaking out of what I have read not really out of what I have experienced.

-Tom

ernstcs
Contributor III

But on our campus no system names are duplicated, which leads me to believe some other service within the network is making it appear the system is still there when it reboots and then names itself with the number...

abenedict
New Contributor II

I can verify that this is not a duplicate naming issue. My iMac at home
constantly renames itself from "iMac-27" to "iMac-27 (2)", and that is only
one computer out of six that is on my network at any given time. I can only
think of 3 things that could be causing it, I have a server at home running
OD for my kids managed accounts, I use remote desktop for various reasons,
or there is just something wrong with bonjour. I personally think it has to
do with remote desktop, but I have no evidence to back that claim. Is
everyone else using Remote Desktop?
--
Alan Benedict
?
Macintosh Technician
The Integer Group
http://www.integer.com

tlarkin
Honored Contributor

I still suspect it has to do with Bonjour. I use remote desktop all
day every day at work. If it were ARD, I think I would see it in mass
numbers.

Kedgar
Contributor

Just throwing this out there... because I have the same issue as everyone else here too. Do you think it may be related in anyway to dns/dhcp and scavanging?

stevewood
Honored Contributor II
Honored Contributor II

I've thought this might be a DHCP issue myself. I have had problems with
On Fri, Aug 6, 2010 at 12:28 PM, Kenneth Edgar <ken.edgar at gmail.com> wrote:
DHCP since moving our server to 10.6. For some reason the DHCP server does
not release IPs that are no longer on lease. So I have to go in once a week
and delete leases that are "dead", otherwise I run out of IP addresses and
have all sorts of other funky problems. And I have our DHCP scope set over
4 Class C subnets for a shop of 130 users!

I'm just not sure how to track this down and fix it. I'm going to be moving
DHCP off of my OS X servers and onto our ASA most likely, or off to our core
switch.

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

Do any of you use DHCP IDs, or use DHCP to push out binds or anything like that?

stevewood
Honored Contributor II
Honored Contributor II

I push out my LDAP info via DHCP.
On Fri, Aug 6, 2010 at 3:17 PM, Thomas Larkin <tlarki at kckps.org> wrote:

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

Since it seems this is being seen across all types of networks and DHCP
servers and these names are being generated locally it sounds to me that it
might be a Apple bug in the OS. I am thinking of going out to a few
computers that are doing this and reset the name and turn off bonjour. Has
anyone done this yet? And if so what has been your findings?

One thing that I have noticed to fix 80% (that has lasted 4 days so far and
still standing) of the computers that have been doing this is to change
their names back to what they should be in JSS and use Remote to "Reset
Computer Names" then I ran Fix Perms. (Something you can try)

- Grant Lutz