You are not logged in.

Announcement

[2017.09.08] DeployStudio build v1.7.8 (checksum, release note).
[2016.08.26] DeployStudio build v1.6.19 (release note).
[2013.02.23] DeployStudio last universal build v1.5.17 (release note).

#1 2014-07-19 15:59:23

flammable
Member
From: Philadelphia, PA
Registered: 2009-07-14
Website

Limit hostname form to 15 characters

Hello!  Would it be possible to restrict the user from typing more than 15 characters in the hostname / computer name fields?

We've found that the AD binding script succeeds even if the hostname is longer than 15 characters, but the system is unstable afterwards.

Microsoft's recommendations continue to be 15 characters, even with a modern Active Directory server:

http://support.microsoft.com/kb/909264
http://serverfault.com/questions/123343/is-the-netbios-limt-of-15-charactors-still-a-factor-when-naming-computers

I'm looking into having the computer halt the process after imaging if it detects the hostname is longer than 15 characters, but if it were possible to prevent that from happening, that'd be better.

Also, I realize the hostname and computer name don't need to match (computer name doesn't necessarily need to be limited to 15 characters), but it makes it easier for us if they do.

Thanks!

Mike

Offline

#2 2014-07-21 13:50:21

AllisterB
Member
Registered: 2013-07-09

Re: Limit hostname form to 15 characters

LocalHost and ComputerName are also not as important for when the computer checks in with munki than HostName - it's odd I need to set that in a postflight script instead of as part of the Configure workflow task. Thanks, Allister

Offline

#3 2014-07-21 15:41:58

flammable
Member
From: Philadelphia, PA
Registered: 2009-07-14
Website

Re: Limit hostname form to 15 characters

I set the same via a postflight:

---

#!/bin/bash

HOSTN=`scutil --get LocalHostName`

scutil --set HostName "$HOSTN"
scutil --set ComputerName "$HOSTN"

exit

---

We found that Macs would show the correct name in System Preferences --> Sharing, but it would still use something else when checking in with Munki.  Having all three fields be the same has helped immensely.

That said, since the AD binding script succeeds even if the hostname is longer than 15 characters, I'm looking for a way to notify the user or halt the process altogether.  If it's possible to do that within DeployStudio's "hostname form" task, that'd be ideal.  Otherwise, I'll look into doing it later in the process (with the drawback that someone might have walked away from the computer by that point).  Thanks!

Offline

#4 2014-10-01 14:47:19

triti
Member
Registered: 2009-05-14

Re: Limit hostname form to 15 characters

> flammable wrote:

> Hello!  Would it be possible to restrict the user from typing more than 15 characters in the hostname / computer name fields?
> We've found that the AD binding script succeeds even if the hostname is longer than 15 characters, but the system is unstable afterwards.

But what if you aren't binding to AD and you want to use more than 15 characters in the hostname or computer name fields?

The Computer ID option in the AD binding task can take a script as an argument. It might be better to write a script that either truncates the host/computer name to 15 characters and passes that as the Computer ID or perhaps returns a RuntimeAbortWorkflow response.

Offline

#5 2014-10-02 00:24:00

flammable
Member
From: Philadelphia, PA
Registered: 2009-07-14
Website

Re: Limit hostname form to 15 characters

Sorry, didn't mean to sound like it should be forced upon everyone - just that it should be an option if that's something that's important to you.  For us, it's very important that the computer name / hostname be limited to 15 characters, and that all three fields for the hostname be populated with the same information.

Thanks for the tip about the AD binding task, I hadn't noticed that!  I'll share if I can make that work.

Offline

Board footer

Powered by FluxBB