Set NetBios name to Computer Name
Hello.
Is it possible, via Terminal, to set the Netbios name of a system to the computer's current name as set in the Sharing panel? I have a ton of computers to configure, and this would make my job much faster.
Regards, Andrew.
Hi,
the actual computer name is stored in a system variable named HOSTNAME. Just type echo $HOSTNAME to retrieve that value:
---------------snip-------------
$ echo $HOSTNAME
pronto-macpro
---------------snap-------------
If there is a NetBIOSName already configured, the value is stored in /Library/Preferences/SystemConfiguration/com.apple.smb.server.plist:
---------------snip-------------
$ defaults read /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName
Pronto-MacPro1
---------------snap-------------
With this informations you should be able to set the NetBIOSName equal to the hostname by using the command (type the following in one line!):
---------------snip-------------
$ sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName $HOSTNAME
---------------snap-------------
To verify if it works just type the defaults read command again:
---------------snip-------------
$ defaults read /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName
pronto-macpro
---------------snap-------------
Hope that helps
Bye Tom
Message was edited by: prontosystems
Similar Messages
-
Getting the user name and computer name
I've been trying to find out how to do this, but can't seem to get it.
I have an AIR application that needs to get the user's login name, and computer name for verification. I can't find anywhere to do this. Is AIR able to get this information? Is there work arounds if there isn't?
It won't ever be a web app, just an AIR app.What I did in Air 2 to accomplish that is the following:
public function getHostName():void {
if(NativeProcess.isSupported) {
var OS:String = Capabilities.os.toLocaleLowerCase();
var file:File;
if (OS.indexOf('win') > -1) {
//Executable in windows
file = new File('C:\\Windows\\System32\\hostname.exe');
} else if (OS.indexOf('mac') > -1 ) {
//Executable in mac
} else if (OS.indexOf('linux')) {
//Executable in linux
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
nativeProcessStartupInfo.executable = file;
var process:NativeProcess = new NativeProcess();
process.addEventListener(NativeProcessExitEvent.EXIT, onExitError);
process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutput);
process.start(nativeProcessStartupInfo);
process.closeInput();
import utls.StringHelper;
public function onOutput(event:ProgressEvent):void {
var strHelper:StringHelper = new StringHelper();
var output:String = event.target.standardOutput.readUTFBytes(event.target.standardOutput.bytesAvailable);
output = strHelper.trimBack(output, "\n");
output = strHelper.trimBack(output, "\r");
trace('"'+output+'"');
The package that I used is from the manual:
package utls
public class StringHelper
public function StringHelper()
public function replace(str:String, oldSubStr:String, newSubStr:String):String {
return str.split(oldSubStr).join(newSubStr);
public function trim(str:String, char:String):String {
return trimBack(trimFront(str, char), char);
public function trimFront(str:String, char:String):String {
char = stringToCharacter(char);
if (str.charAt(0) == char) {
str = trimFront(str.substring(1), char);
return str;
public function trimBack(str:String, char:String):String {
char = stringToCharacter(char);
if (str.charAt(str.length - 1) == char) {
str = trimBack(str.substring(0, str.length - 1), char);
return str;
public function stringToCharacter(str:String):String {
if (str.length == 1) {
return str;
return str.slice(0, 1);
And sorry for the miss topic I just realized that it is on flex topic, but I post it either way it may be useful for anyone -
How to set Netbios/Partial Qualified Domain name for a Mac?
Is it possible to set a Netbios/Partial Qualified Domain name for a Mac the way one sets it for a PC? If so, where can this be set? Apparently, this is what my router uses to report clients connected by DHCP.
MikeYou're looking for something completely different if
what you're after is to have your DHCP server (your
router) report your computer name.
yep - that's what I'm looking for but everything else didn't pan out so I'm following up the suggestion of our IT guy (which is that it reports the Netbios name).
I don't know what brand or model of router you're
using but with a Linksys brand router it reports the
yep - I've got a Linksys, about 2 years old (802.11b).
computer name, which is set on your Mac under Apple
menu --> System Preferences... --> Sharing. The
Linksys router will report the computer name
typically found under Status --> Local Network -->
DHCP Clients Table.
nope - I've got it set as "Michael Levin Laptop", but the Linksys router shows it (and all of the other Macs on the network) as "¸#Єª"... Any way to debug this?
What you'll notice is that none of this has anything
to do with Windows. Today's basic networking is
platform agnostic.
I thought so; it was a desperation move, based on my IT person's suggestion...
Thanks,
Mike -
Need to the domain name and computer name in offline mode
Hi,
I can not able to login to the windows system, the password i am using is correct. But im getting error "the login method using is incorrect, please contact network admin". I forgot the domain name i set to login to the system. Now Currently i
dont have the recovery/windows7 disks. I have Unix in my machine as well. so i have mounted the windows7 parition in linux, and trying to find out the computer\domain name. so please suggest which file i need to search to get the details.
Thanks,
RaviHi Ravi,
If you want to know more information about domain name, please take a look at the following article.
http://technet.microsoft.com/en-us/library/cc731265(v=ws.10).aspx
Based on my research, the computer name and domain name are stored in the registry key.
We could find computer name in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName.
And we can find domain name in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Domain.
Have you ever joined a domain?
If yes, please contact the network admin as mentioned.
And we can type Domain name\Username and then password to login.
If you haven’t, we could try to type Computer name\username(.\username) and then the password to login the computer.
Best regards,
Fangzhou CHEN
Fangzhou CHEN
TechNet Community Support -
LOGICAL SYSTEM NAME OR COMPUTER NAME
Dear Experts,
How can we get computer name of the user in SAP,agaisnt bsuiness transactions for outbound deliveries and finance documents.
Best rgds
ManiHi,
enter SM04.
regards -
Changing the screen name or computer name.
when i installed leopard and it asked for information on the computer name i put the wrong information. how do i change the computer name. i looked in accounts under system prefences and i changed the name there but in finder under places where there is the home button it is the old one. how do i completely change all of it to the new one.
thanksOpen the Accounts pane of System Preferences, unlock the padlock, control-click your account, choose Advanced Options, and change it. If you change the home directory's path, you also need to move its contents in the Finder.
(40769) -
MDT 2012 Windows 7 Deployment Stops At User Account and Computer Name Setup Page
I was given a sysprepped custom Windows 7 WIM image that was set up by a third party that didn't use MDT to create the WIM.
I created a task sequence to deploy it, but it never finishes. After the OS installs and it reboots, it comes up to the white setup page asking for a user name and computer name that looks like this image:
Is there a setting in MDT that can change that behavior?Are you joining the computer to a domain?
It sounds like MDT did not create the unattend.xml file itself (or is there an unattend file already in the image itself?)
MDT needs to be able to autologin with the local admin account
From MDT in your task sequence - OS info - Edit unattend.xml you can check if your unattended file is correct.
Check what's in there for:
- computer name in 4 Specialize area - Windows-Shell-Setup_neutral (it should be empty if you want MDT to handle it).
- Also i think you need to have in the Specialize section, under Microsoft-Windows-Deployment_neutral - Run Synchronous an EnableAdmin insert
This will enable the local admin account
- Also check in phase 7 oobe System in Shell-Setup_neutral
There should be an autologon with a count of 999
Check if you have any Local Accounts there.
Finally read this:
When I am joining clients to a domain, can I avoid creating a local user
account on the computer?
Yes. To do this, create an image unattend file that adds a domain account to the Administrators group. In addition, you must delete the <LocalAccounts> section if it is present in your
unattend file (simply commenting it out will not work). An example file is below. Note that if domain join fails, Windows Deployment Services will not use the unattend file so you will be able to create a local account. For more information about creating
unattend files, see Automating Setup.
<?xml version='1.0' encoding='utf-8'?>
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:ms="urn:schemas-microsoft-com:asm.v3" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="amd64">
<UserAccounts>
<AdministratorPassword>
<Value>password</Value>
<PlainText>true</PlainText>
</AdministratorPassword>
<DomainAccounts>
<DomainAccountList wcm:action="add">
<DomainAccount wcm:action="add">
<Group>Administrators</Group>
<Name>DomainAdmin</Name>
</DomainAccount>
<Domain>DomainName</Domain>
</DomainAccountList>
</DomainAccounts>
</UserAccounts>
</component>
</settings>
</unattend>
I tried opening the unattend.xml from the MDT workbench, but it errors out saying it cannot be done because the captured image is x86. -
I was a beta tester of Yosemite and recently updated to retail. This happened while I was a beta tester and I thought it would go away, but it hasn't. My computer name is being followed by a (#) that continues to increase for no reason (e.g. (1), (2), (3), etc.) - any ideas?
I'm having the same issue with my iMac (early 2008) and MacBook Pro (2010). It's very weird, both machines insist on appending numbers in parentheses to the end of the Computer name: in the Sharing preference panel. However the name given beneath that in the message "Computers on your local network can access your computer at: <computer-name>.local" does not include the number, just the normal hostname.local. Also, using hostname command in terminal returns the regular <computer-name>.local without a number.
If I remove the (n) at the end of the Computer name: field it only lasts a few seconds before changing back to a number (though the number is not always the same as before, sometimes it goes to (2) or (3) rather than the (4) it was originally.
If I open a Finder window with the sidebar showing I see under Devices an entry for "<computer-name> (4)" and under Shared it shows:
<computer-name>
<computer-name> (2)
<computer-name> (3)
I have screen and file sharing enabled, I tried switching them off and on again, I've tried rebooting, nothing seems to stop it appending the number and I can't get rid of the <computer-name> (2) and <computer-name> (3) entries under Shared either. -
I work in a university/medical environment, with large amount machine on the network. I'm running into an issue with DNS names and Computer name being different.
Example: Computer Name: div-001
DNS Name: mm-Ughe
DNS name appears when i do a nslookup of the Ip that is assigned to machine by DHCP.
Our end goal is to be able to use VNC client to remote support the Mac computer via hostname across the university, which will entail different subnets.
Hope this make sense, and appreciate any help.The question is, when you do the nslookup (or dig, as nslookup has been deprecated), what is the authoritative server? It's as simple a matter as putting the name you want in the hosts file of the authority. Except if you use DHCP. Then you need to look into services like yp (yellow pages) or NIS. If you don't want to go that path, don't use DHCP, assign static IP addresses.
-
How automatically change the computer name as VM name
Hi All,
I need to deploy lot of VM via one VM ,i need to use the newsid with change the computer name like VM name.
i want to script this by geting the VM name and send it to newsid to change the computer name.
there is a way to get the VM name from running guest or host.
Thanks,Hi All,
i can't use template since i have check point on that VM.
i have one vm called goldenimage load to lib and i have to deploy 8 vm per one host,i must use newsid before i connect that guest machine to network domain,so i what to add to runone registery some script that run the newsid in first time but for each vm am i need to change the computer name according to vm name.
if the vm name is XPPro-xx-yy(xx-host name yy-vm num) i want that will be also the name of computer name.
Thanks, -
Anyone is applying the Logical Disk Extension Management Pack By David Allen?
I have the issue whereby the Computer name will showed as "#Error" on the managed computer which is in
Workgroup environment.
Refer to this screenshot --> https://skydrive.live.com/?cid=75e44d0edffe5025#cid=75E44D0EDFFE5025&id=75E44D0EDFFE5025%21942.
Is anyone know the way to fix this?
Thanks!
regards, Han Seen.The solution I used is to edit the management pack: the report displays the computer name only for computers that contains suffix in its name. if in SCOM the computer name is hostname.domain.net, only hostname will be shown as computer name.
you can change it by editing the management pack:
replace line number 2230 instead of
<Value>=Left(Fields!Computer.Value,(instr(Fields!Computer.Value,".")-1))</Value>
replace it with
<Value>=Fields!Computer.Value</Value>
now it will show you the full computer name under computer name area, and workgroup computer will be shown as well. -
Setting computer name on a VM created from template (SCSM, SCVMM and SCORCH)
We've set up some basic server provisioning automation to see how it works. It's a fairly simple setup so far:
1. User submits ticket via the SCSM portal; the ticket includes the desired machine name.
2. Ticket requires our team's approval before the workflow continues into Orchestrator.
3. If approved, an Orchestrator runbook is kicked off, using SCVMM to create the server from a template.
The resulting server has the correct machine name in SCVMM, but the machine name inside the OS is randomly generated (the template currently has * in OS Configuraiton -> Identity Information in the VM Template properties).
What's the best way to make the computer name inside the OS reflect the desired machine name? I can think of a number of ways we could accomplish this, but I don't know SCORCH/VMM that well yet. I'm wondering if I have overlooked something simple inside
the existing process we're using. I suspect that, if there is an easy solution, it would lie in VMM.
Many thanks for your time and consideration.I've got the Guest OS Profile partially working, but frustratingly, it doesn't seem to be applying all of the settings.
Here is what I have done so far:
1. A Guest OS Profile has been set up which includes all of the settings I am currently trying to test: domain join, feature installation (nothing fancy for now, just Powershell and Telnet Client), and a KMS key for Server 2012.,
2. Orchestrator Runbook gets the existing OS Profile, creates a new one based on the VM, and uses the parameter -ComputerName to pass the name of the VM to the Guest OS Profile. The new Guest OS PRofile is showing up correctly in VMM, with the right settings.
3. The runbook then deploys the new VM from template, using the newly set up Guest OS Profile. The machine is set up correctly, and will boot. Not all of the settings from the Guest OS Profile transfer over, however. The Domain Join and KMS portions work
without a problem. The features I have tried to add are not installed, though, and the computer name remains randomly generated.
I know the Guest OS Profile must be getting used, since the machine gets domain joined; the template does not include domain join credentials. What I can't work out is why some of the settings are being applied while others are not. -
Is it possible to change NETBIOS (Computer Name) of a computer under a domain controller via SCCM 2012 Console?
example:
Domain Name: viyella.com
current Computer (FQDN host) name: vtgit-shohal.viyella.com
New Computer (FQDN host) name: vtgit-moin.viyella.com
if so, I will organized all computer of my organization and managed.
please help.
Thanks,
Shohal Bhuiyan
Shohal BhuiyanHi,
Netdom is
a command-line tool that is built into Windows Server 2008 and Windows Server 2008 R2. It is available if you have the Active Directory Domain Services (AD DS) server role installed. It is also available if you install the Active Directory
Domain Services Tools that are part of the Remote Server Administration Tools (RSAT).
Netdom renamecomputer
http://technet.microsoft.com/en-us/library/cc788029.aspx
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Set Computer name by computers serial number ?
Hi guys!
I need a simple script or something to set computer name(serial number) and add computer to our domain. Computer name should be for laptop, LT-"serialno" and for Desktop it should be DT-"serialno"
Is there a simple way to fix this? I have tried WSname, but no luck there. My scripting skills are equal with zero.
Thx for all help and tips!
/JanneHELP Add-Computer -FULL
You need to start learning script somewhere. We can help but we will not write scripts for you.
Start here:
http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx
Look here:
http://gallery.technet.microsoft.com/site/search?f%5B0%5D.Type=RootCategory&f%5B0%5D.Value=hardware&f%5B0%5D.Text=Hardware&f%5B1%5D.Type=SubCategory&f%5B1%5D.Value=basichardware&f%5B1%5D.Text=Basic%20Hardware%20and%20Firmware
¯\_(ツ)_/¯ -
[SOLVED] Set computer name (?)
Hey,
whenever I start Arch I get the message 'Arch Linux x.x.x-x-Arch ((none)) (ttyx). Thus, logging in I get username@(none).
How do I get rid of the (none)? Isn't that suppose to be my computer name? If so, how do I rename my computer?
Sorry for bugging with newbie questions, but can't seem to find a useful answer, probably due to me not understanding where the problem lies.
Thanks!
Last edited by foreveraloneguy (2012-01-26 00:30:35)foreveraloneguy wrote:
I admit I haven't read the beginners guide. I didn't think that I will run into so many 'walls'.
I actually tried changing hostname, just forgot to reboot.
... good old reboot. Sometimes it even helps in unix systems...
Good ol' reading/searching/wiki-ing - it helps no matter what system you have
Maybe you are looking for
-
ITunes application could not be opened. An unknown error occurred (0x666D7
Been using iTunes 6 and 6.5 for months and months on my computer. Upgraded to 7.0. Installs just fine. No errors, no issues. At the end, it asks if it can launch iTunes 7.0 and I click okay. I get this: The iTunes application could not be opened. An
-
How do you uninstall Photoshop from one computer and retain the serial number?
I purchased Photoshop CS4 a few years ago which allowed me to use the serial number on two computers, however the initial laptop I installed it on suffered fatal injuries and couldn't be recovered. The problem is that Photoshop is still technically i
-
Measuring of Text with Multiple Fonts in One Single Line
I am following a request to write C++ code for a label that contains several text elements in one single line, varying by font, size, color.... Ok, that can be done easily in GDI+ by measuring each element's width and then execute a DrawString for ea
-
Need WebI prompt values to reflect values in cube, not values in a LOV file
While building the prompts for my reports, the values that appear when refreshing my prompt are that which are in a LOV repository file. These values do not reflect what is in the cube and may confuse a user. I am wondering how to get a full list (
-
Access to Enterprise Services Repository (ESR)
Hello, how can I access an ESR from a simple java console without having to use the Enterprise Services Builder? - Is there an API available? - Can somebody point me to a "best practice" for working with the ESR by using Java? Thx a lot!