April 18, 2019

Networking with Ubuntu 8.04 and Windows Part 1 - page 3

Installing the Samba Package for Ubuntu

  • June 23, 2008
  • By Eric Geier

Since sharing folders on a network makes your files more vulnerable to access by unauthorized people, letting everyone have the right to share shouldn't be in your computing bill of rights. The Ubuntu developers recognized this thought and made it so only Administrator accounts can, by default, share folders and files among the network, leaving users classified as a Desktop User or Unprivileged out of the loop. However, if you have non-Administrator accounts that you want to be able to share, giving these accounts sharing privileges only takes a simple change in the Users and Groups window:

  1. Click System | Administration | Users and Groups.
  2. On the User Settings window, click the Unlock button, choose an Administrator account, enter the account password, and click the Authenticate button.
  3. On the User Settings window, choose the user you want to give sharing privileges to and click the Properties button.
  4. Choose the User Privileges tab, and select the Share files with the local network checkbox.
  5. Click the OK button to apply changes and close the window.
  6. For changes to take effect, restart your computer.

Changing the Workgroup for Ubuntu

When browsing through the computers on your network, such as from My Network Places in Windows XP or the Network window of Vista or Ubuntu, you'll see that computers are divided into groups. These groups are either a Workgroup (used on small networks) or Domain (used in larger more complex networks) and exist to help control what users have access to on the network.

Since you're probably working with a small network, you are likely using a Workgroup (rather than a Domain) and each computer on the network should be set to the same Workgroup. The default Workgroup value after installing the Samba software on Ubuntu is WORKGROUP. This may be the same value of your Windows PCs; however you should double-check and follow these steps if a change is necessary on your Ubuntu computer:

  1. Click System | Administration | Shared Folders.

If you don't see the Shared Folders shortcut, click Applications | Accessories | Terminal, type shares-admin and hit enter.

  1. On the Shared Folders window, click the Unlock button, enter your account password, and click the Authenticate button.
  2. Select the General Properties tab.
  3. Type in your desired value into the Domain/Workgroup field.
  4. Click the Close button.
  5. For changes to take effect, restart your computer.

You can alternatively change the Domain/Workgroup value by editing the smb.conf file; here's precisely how to:

  1. Click Applications | Accessories | Terminal.
  2. Type sudo gedit /etc/samba/smb.conf 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 smb file opened.

  1. Change the value that appears after the workgroup =, highlighted in Figure 4.
  2. Click the Save button on the text editor's toolbar and close the window.
  3. For changes to take effect, restart your computer.

Most Popular LinuxPlanet Stories