Changing the Computer Name of your Eee PC

The Denki-Guy has been using his new Eee PC 900, Linux model for a couple months now.  After a number of configuration changes documented in these pages, I have my little NetBook working nicely.  Yet … there is one thing that was still bugging me.  Using my Windows system, when go to View workgroup computers (from My Network Places), my NetBook is advertised as follows:  “asus-505051062 server (Asus Eee PC) (asus-505051062)”.  I’m not kidding.  Now you know why it has been bugging me.

This long name comes from two places: the Computer Name and the Samba server string.

Computer Name is a generic term for the name used to identify you computer on the network.  In Unix/Linux, host name is used instead of computer name.  The host name of my computer, before I made the change, was “asus-505051062”.  I imagine that  Asus generates the number portion of the name at their factory to give each Eee PC a unique name.  Thank you for the good work Asus but it is now time to select a new host name.  A host name consists of 1 to 15 alphanumeric (A-Z, a-z, 0-9) characters with no spaces or special characters other than hyphen (-).  There is a good article from Microsoft on naming conventions.  It would be good idea to read the “Best practices” section before choosing a name.

The Samba server string is the “asus-505051062 server (Asus Eee PC)” portion of the NetBook advertisement.  You have probably noticed that the host name appears in the server string.  This was done intentionally.  I know this by looking at these lines in the Samba configuration file, smb.conf.

# server string is the equivalent of the NT Description field
   server string = %h server (Asus Eee PC)

Note the %h in the server string.  The percent sign preceeding a single character represents a Samba server variable.  In this particular case %h represents the DNS hostname.  The Server variables are a way to insert machine specific information into the configuration file.  You do not need to include the host name in the server string but you can is you want.  A list of all the server variables can be found in table 6-2 of this document.  I tried to find some information on maximum string length or disallowed characters for the server string but I could not find anything specific.  That said, I think it is best to keep this string brief.

Now that you have all the background, let’s go to work.

Changing the host name (Computer Name)

  1. Press CTRL + ALT + T on the keyboard to bring up a terminal  screen.
  2. Type sudo xedit /etc/hostname  ENTER in the terminal window.  A xedit window will appear.
  3. Delete the old name and enter the new host name you have chosen.  The new host name I chose was “netbook-101"
  4. Click on the xedit Savebutton twice.  Close xedit.
  5. Type exit ENTER in the terminal screen to close the window.

Changing the Samba server string

  1. Press CTRL + ALT + T on the keyboard to bring up a terminal  screen.
  2. Type sudo xedit /etc/samba/smb.conf  ENTER in the terminal window.  A xedit window will appear.
  3. Look for the line that says server string = %h server (Asus Eee PC)
  4. Change the right side of the server string assignment to reflect the new string you chose.  In my case server string = My White Eee PC 900.
  5. Click on the xedit Save button twice.  Close xedit.
  6. Type exit ENTER in the terminal screen to close the window.
  7. Restart the Eee PC.

After your Eee PC reboots, wait a minute or so and then from your Windows PC go to My Network Places -> View workgroup computers.  You should see both the new server string and the machine name on the page.  My Eee PC is now advertised as “My White Eee PC 900 (Netbook-101)”.  Note how Windows did me a favor and capitalized the first letter in Netbook.  I double checked and indeed, the computer name on the Eee PC side is all lower case.

The Denki-Guy


Tags: , , ,

2 Responses to “Changing the Computer Name of your Eee PC”

  1. Mini Notebook Says:

    thanks for ur article

  2. denkigai Says:

    Jerry, Thank you for the kind word. BTW, I really like your review of the EEE PC 900 (to see this review, click on the “Mini Notebook” link above). I completely agree with your comments on the pricing. I think the magic price point for a NetBook computer is $300 or less.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: