April 19, 2014
 
 
RSSRSS feed

Networking with Ubuntu 8.04 and Windows Part 1 - page 2

Installing the Samba Package for Ubuntu

  • June 23, 2008
  • By Eric Geier

By default, Samba requires you to configure a password for use when accessing the shares from other computers. (In a later part of this series we'll discuss advanced sharing configuration, like guest shares) This will be, for example, the password you'll use in conjunction with your Ubuntu username when prompted to enter logon credentials after double-clicking a computer icon in the My Network Places or Network window in Windows.

Creating a username for Samba only takes one line of code in Terminal:

  1. Click Applications | Accessories | Terminal.
  2. Type sudo smbpasswd -a username and hit the Enter key.

Replace the word username above with the login or user name of your Ubuntu account, as you can see in the example shown in Figure 2.

If Terminal comes back and says sudo: unable to resolve host , you'll need to refer to the next set of steps before moving on.

  1. Type your Ubuntu account password and hit the Enter key.
  2. Type a password for the SMB account and hit the Enter key.
  3. Retype the same password and hit the Enter key.

If you received the unable to resolve host error after executing the smbpasswd command, it's probably because you were fiddling around with settings and you specified a Domain Name in the General tab of the Network Settings. (We discuss changing the Workgroup value later.) Yet you can revert to being domain name-less (so you can continue setting up SMB) by editing the hosts file. Here's exactly how to perform the fix:

  1. Click Applications | Accessories | Terminal.
  2. Type sudo gedit /etc/hosts and hit the Enter key.
  3. Type in your Ubuntu account password and hit the Enter key.

The text editor should pop-up with the hosts file opened.

  1. Delete the Domain Name, including the preceding period, that's just after 127.0.1.1 and your Computer Name; such as Figure 3 shows.
  2. Click the Save button on the text editor's toolbar, close the window, and proceed with the previous set of steps.

Sitemap | Contact Us