Windows Co-operation


General matters go here...

Notes regarding this chapter

Before you do anything in this chapter, see:
  1. "General Notes"
  2. All answers regarding networking in this chapter assume that Samba is already installed. See "How to install Samba"


How to change computer descriptions?

  1. See Chapter Notes and "How to install Samba"
  2. Click through...

  3. Assuming that you want to change your computer description from the default "%h server (Samba, Ubuntu)" to "Kubuntu File Server";
    Tab ::  [ Base Settings ] 
    ,-- Server Identification ----------------------------------------. | Workgroup: [Don't touch this field! ] | | NetBIOS name: [Don't touch this field! ] | | Server string: [Kubuntu File Server ] | `-----------------------------------------------------------------'
  4. sudo /etc/init.d/samba restart


How to change computer Domain/Workgroup?

  1. See Chapter Notes and "How to install Samba"
  2. Click through...

  3. Assuming that you want to change your Workgroup name from the default "MSHOME" to "KubuntuGroup";
    Tab ::  [ Base Settings ] 
    ,-- Server Identification ----------------------------------------. | Workgroup: [KubuntuGroup ] | | NetBIOS name: [Don't touch this field! ] | | Server string: [Don't touch this field! ] | `-----------------------------------------------------------------'
  4. sudo /etc/init.d/samba restart


How to share Kubuntu folders out to Windows?

  1. See Chapter Notes and "How to install Samba"
  2. Click through:

  3. ,-- [x] Enable local network file sharing ----------------------. | (*) Simple sharing | | | | ... | | | | ( ) Advanced sharing | | | | ... | | | | [x] Use Samba (Microsoft(R) Windows(R)) | | [x] Use NFS (Linux/UNIX) | | [Allowed Users] | `---------------------------------------------------------------' ,-- Shared Folders ---------------------------------------------. | | Path | Samba | NFS | | [Add...]| | [Change]| | [Remove]| `---------------------------------------------------------------'
  4. Also see "How to share files between Linux machines the easy way" for an easier way to share folders between Linux machines.


How to browse network computers?



How to mount/unmount network folders for all users, manually?

  1. See Chapter Notes and "How to install Samba"
  2. Assumptions:
    • Network connections have been configured properly,
    • Remote computer's IP address: 192.168.0.1
    • Remote computer's Username: myusername
    • Remote computer's Password: mypassword
    • Shared folder's name at remote computer: linux
    • Mount folder at local computer: /mnt/sharename
  3. sudo mkdir -p /mnt/sharename
  4. Mount (start accessing) the remote Windows shared folder:
    • Either read-only;
      sudo mount //192.168.0.1/linux /mnt/sharename -o  \
          username=myusername,password=mypassword
    • Or read-write;
      sudo mount //192.168.0.1/linux /mnt/sharename -o  \
          username=myusername,password=mypassword,dmask=777,fmask=777
  5. Unmount ("stop") it:
    sudo umount /mnt/sharename


How to mount network folders for all users, on boot-up?

  1. See Chapter Notes and "How to install Samba"
  2. Assumptions:
    • Network connections have been configured properly,
    • Remote computer's IP address: 192.168.0.1
    • Remote computer's Username: myusername
    • Remote computer's Password: mypassword
    • Shared folder's name at remote computer: linux
    • Mount folder at local computer: /mnt/sharename
  3. sudo -i
    mkdir -p /mnt/sharename
    echo "username=myusername" > /root/.smbcredentials
    echo "password=mypassword" >> /root/.smbcredentials
    cp -a /etc/fstab /etc/fstab.`date +%y%m%d-%H%M%S`
  4. Do fstab setup
    • For read-only access,
      echo "//192.168.0.1/linux /mnt/sharename smbfs  \
          credentials=/root/.smbcredentials 0 0" >> /etc/fstab
    • For read-write access,
      echo "//192.168.0.1/linux /mnt/sharename smbfs  \
          credentials=/root/.smbcredentials,dmask=777,fmask=777 0 0" >> /etc/fstab
  5. mount -a
    logout


How to mount/unmount Windows partitions manually?

There's only read-only NTFS access provided in default Kubuntu. Read-write access is possible, but risky.
  1. Read "How to display partition tables"
  2. Assumptions:
    • Windows partition (NTFS or FAT) is located on /dev/hda1
    • Local mount folder: /mnt/windows
  3. sudo mkdir -p /mnt/windows
  4. Mount (start accessing) the Windows partition:
    • Either read-only (for NTFS);
      sudo mount /dev/hda1 /mnt/windows -t ntfs -o umask=0222
    • Or read-write (for FAT);
      sudo mount /dev/hda1 /mnt/windows -t vfat -o umask=000
  5. Unmount ("stop") it:
    sudo umount /mnt/windows


How to mount Windows partitions on boot-up?

There's only read-only NTFS access provided in default Kubuntu. Read-write access is possible, but risky.
  1. Read "How to display partition tables"
  2. Assumptions:
    • Windows partition (NTFS or FAT) is located on /dev/hda1
    • Local mount folder: /mnt/windows
  3. sudo -i
    mkdir -p /mnt/windows
    cp -a /etc/fstab /etc/fstab.`date +%y%m%d-%H%M%S`
  4. Do fstab setup
    • For read-only access (NTFS),
      echo "/dev/hda1 /mnt/windows ntfs umask=0222 0 0" >> /etc/fstab
    • For read-write access (FAT),
      echo "/dev/hda1 /mnt/windows vfat umask=000 0 0" >> /etc/fstab
  5. mount -a
    logout


How to restore GRUB menu after Windows installation?

  1. Assumption: The partition on which the /boot directory resides, is on /dev/hda (primary-master) drive.
  2. Read "How to use Kubuntu Installation CD to gain root user access"
  3. grub-install /dev/hda


How to add Windows entry into GRUB menu?

  1. Assumption: The partition on which the /boot directory resides, is on /dev/hda (primary-master) drive.
  2. Read "How to display partition tables"
  3. sudo -i
    cp -a /boot/grub/menu.lst /boot/grub/menu.lst.`date +%y%m%d-%H%M%S`
    cat >> /boot/grub/menu.lst << EOGRUB
    title		Windows
    root		(hd0,0)
    savedefault
    makeactive
    chainloader	+1
    EOGRUB
    logout


How to SSH into remote Kubuntu from Windows?

  1. Install OpenSSH-server on remote Kubuntu.
  2. Download & run PuTTY on Windows.


How to copy files/folders from/to remote Kubuntu using Windows?

  1. Install OpenSSH-server on remote Kubuntu.
  2. Download & run WinSCP on Windows.