Set Sharing Name, Hostname and Local Subnet Name To [PREFIX]-[SERIAL#]-[SUFFIX] - Mac
Log In or Register to download the BES file, and more.

0 Votes

Description

This Fixlet prompts the TEM console for a Prefix and Suffix to use in the computer name.  It then sets the sharing, host and local subnet names to [Prefix]-serialnumber-[Suffix]. If you leave the Prefix or Suffix blank it will skip the related hyphen.

By making these names all match computers should appear in SEP and Secunia using their Sharing Name.


Property Details

ID3648
StatusBeta - Preliminary testing ready for more
TitleSet Sharing Name, Hostname and Local Subnet Name To [PREFIX]-[SERIAL#]-[SUFFIX] - Mac
DomainBESC
SourceInternal
Source Release Date4/6/2012 12:00:00 AM
KeywordsMac, sharing, host, local subnet, hostname, name
Added by on 10/24/2013 7:24:52 AM
Last Modified by on 10/24/2013 7:24:52 AM
Counters 4424 Views / 42 Downloads
User Rating 1 star 2 star 3 star 4 star 5 star * Average over 0 ratings. ** Log In or Register to add your rating.

Relevance

Used in 19 fixlets and 2 analyses   * Results in a true/false
Show indented relevance
name of operating system = "Mac OS X"
Used in 2 fixlets   * Results in a true/false
Show indented relevance
system version >= "10.5" as version

Actions

Action 1 (default)

Action Link Click here to deploy this action.
Script Type BigFix Action Script
action parameter query "Prefix_Name" with description "Please enter the name Prefix (optional)"
action parameter query "Suffix_Name" with description "Please enter the name Suffix (optional)"

parameter "compName" = "{string "IOPlatformSerialNumber" of dictionary of service plane of iokit registry}"

if {not (parameter "Prefix_Name" of action = "")}
    parameter "compName2" = "{parameter "Prefix_Name" of action}-{parameter "compName"}"
else
    parameter "compName2" = "{parameter "compName"}"
endif
if {not (parameter "Suffix_Name" of action = "")}
    parameter "compName3" = "{parameter "compName3"}-{parameter "Suffix_Name" of action}"
else
    parameter "compName3" = "{parameter "compName2"}"
endif

wait sh -c "scutil --set ComputerName {parameter "compName3"}"
wait sh -c "scutil --set HostName {parameter "compName3"}"
wait sh -c "scutil --set LocalHostName {parameter "compName3"}"
Success Criteria

This action will be considered successful when the applicability relevance evaluates to false.


Sharing

Social Media:
Share this page on Yammer

Comments

Log In or Register to leave comments!