To network Ubuntu 9.10 with Windows XP, you need to perform two procedures:
- On your XP computer, use the Set Up Sharing on Windows XP procedure below to share your XP Shared Documents folder with all network users.
- On your Ubuntu computer, use the Set Up Sharing on Ubuntu procedure below to create a share point, which is a desktop icon through which you have read and write access to the Shared Documents folder on your XP computer.
To set up Windows XP to share documents with Ubuntu through your wired, ethernet home network, do the following:
- On your Windows XP computer, click My Computer to display its window.
- Right-click Shared Documents, click Properties to display its window, and then click Sharing to display its page.
- In the "Network sharing and security" frame:
- Select Share this folder on the network.
- Write down the Share name, which is "SharedDocs" in this example. You will need the Share name when you perform the Set Up Sharing on Ubuntu procedure below.
- Select Allow network users to change my files.
- Click Apply to set folder permissions, and then click OK to close the window.
- Click Start, click Settings, and then click Control Panel to display it.
- Double-click System to display its window, and then click Computer Name to display its page.
- Write down the contents of the Full-computer-name field, which is "alpha" in this example. You will need the Full computer name when you perform the Set Up Sharing on Ubuntu procedure below.
To set up Ubuntu to share documents with Windows XP through your home network, do the following:
- On your Ubuntu computer, click Applications, select Accessories, click Terminal to display its window, and then do the following:
- Type sudo aptitude install smbfs, press Enter, type your password, press Enter again, follow the prompts, and then to install the smbfs packages, which you need for sharing files on the network.
- Type sudo mkdir /media/ubuntusharename, and then press Enter to name the share icon that will be on the Ubuntu desktop. Use a meaningful name for the ubuntusharename. This example uses "betashare" because the Ubuntu computer name is beta.
- Type sudo nano /etc/nsswitch.conf, and then press Enter to display the nsswitch configuration file through the nano editor.
- On the Hosts line, use the arrow keys to move your cursor to the "d" in dns on the hosts line, type wins and a space immediately before dns so that the hosts line is
hosts: files mdns4_minimal [NOTFOUND=return] wins dns mdns4. - Press Ctrl+X, type y, and then press Enter to save your edits and close the nano editor.
- Type sudo aptitude install winbind, and then press Enter to install windbind.
- Close the terminal window, and then turn off your Ubuntu computer completely.
- Turn your Ubuntu computer back on, click Applications, select Accessories, click Terminal to display its window, and then do the following:
- Type sudo cp /etc/fstab /etc/fstab_old, and then press Enter to back up your fstab file. Do not skip this step because fstab is an important system file. In case you need to recover fstab, use the following command: sudo mv /etc/fstab_old /etc/fstab.
- Type sudo nano /root/.smbcredentials, and then press Enter to display your credentials file, which might be empty.
- Add two lines to your credentials file:
username=winusername
password=winpassword
Replace winusername with your user name on your Windows XP computer. Replace winpassword with your Windows XP password. - Press Ctrl+X, type y, and then press Enter to save your edits and close the nano editor.
- Type sudo chmod 700 /root/.smbcredentials, and then press Enter so that only root can access your credentials file.
- Type sudo nano /etc/fstab, and then press Enter to display your fstab file. At the bottom of the file, add the following line:
//wincomputername/winsharename /media/ubuntusharename cifs guest,rw,iocharset=utf8,file_mode=0777 0 0
Replace wincomputername with your Windows XP Full computer name, which is "alpha" in the Set Up Sharing on Windows XP procedure above. Replace winsharename with your Windows XP Share name, which is "SharedDocs" in the Set Up Sharing on Windows XP procedure above. Replace ubuntusharename with your Ubuntu share name, which is "betashare" in this example. Therefore, this line on the example Ubuntu computer is:
//alpha/SharedDocs /media/betashare cifs guest,rw,iocharset=utf8,file_mode=0777 0 0 - Press Ctrl+X, type y, and then press Enter to save your edits and close the nano editor.
- Type sudo mount -a, and then press Enter to display your Ubuntu-share icon on your Ubuntu desktop.
- Close the terminal window, and then double-click your Ubuntu-share icon to open it. It should contain the same folders and files as the Shared Documents folder on your Windows XP computer.