rsync

http://pkeck.myweb.uga.edu/ssh/

http://www.jdmz.net/ssh

1) make sure ssh and rsync are installed on both computers

2) at the visitor machine’s shell window, type the following command
$ cd /root/.ssh
$ ssh-keygen -t dsa -b 1024 -f visitor_machine_key

enter a BLANK passphrase

3) generate a file called “config” in the visitor machine under /root/.ssh/ with options like these
Host remote_host_machine
User root
Compression yes
Protocol 2
RSAAuthentication yes
StrictHostKeyChecking no
ForwardAgent yes
ForwardX11 yes
IdentityFile /root/.ssh/visitor_machine_key

4) Copy the /root/.ssh/visitor_machine_key.pub file and paste the file in or
at the end of the remote host machine’s file /root/.ssh/authorized_keys2

Samba set up

  • Linux side:
  • Started with the initial Samba configuration file /etc/samba/smb.conf, here are a few important lines that I modified or turned on:

    workgroup = workgroup #change workgroup to my own home network name here

    security = share # I need to include printer, and found security=user could add complexity to an occasional guest computers.

    encrypt password = YES
    samba password file =/etc/samba/smbpasswd

    Then I add my username to my samba password file
    $ smbpasswd -a myusername

    Restart the samba daemon
    $ /etc/init.d/smb restart

    Turn off the firewall:
    $ /etc/init.d/iptables stop

    In fact, one just needs to open a few ports instead of turning off the entire firewall, but here is just a simple solution if the computers are safely isolated from the internet by a router.

  • windows side
  • Click “My Network Places” -> “Set up a home or small office network”, and a set up window will appear. Just go through the rest steps following the question in the window. An early mistake that I’ve ever made before is when it asked “Select the statement that best describe the computer”, I chose the first one, i.e., directly connect to the network. In fact, the correct one shoud be the second, i.e., the computer is connected to another computer or gateway in my case, because indeed my computer is connected to my wireless router, which effectively is a small computer.

    Finally, clicking “My Network Places” will show the samba server. Clicking the server will prompt you a username and password, which is the username and password that you added in the previous Linux side step.

    I was also trying to set up access of my Linux machine to the Windows machine, but found XP SP2 firewall is blocking access. So I didn’t bother to try more.

    Here is the final set up (output of testparm)

    # Global parameters
    [global]
    workgroup = HOLLYWOOD
    server string = Samba Server
    security = SHARE
    log file = /var/log/samba/%m.log
    max log size = 50
    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
    printcap name = /etc/printcap
    dns proxy = No
    idmap uid = 16777216-33554431
    idmap gid = 16777216-33554431
    cups options = raw

    [homes]
    comment = Home Directories
    read only = No
    browseable = No

    [printers]
    comment = All Printers
    path = /var/spool/samba
    guest ok = Yes
    printable = Yes
    browseable = No

    Host name

    In my home’s intranet, I need to connect to my linux server from my XP laptop. To directly use the linux computer’s name instead of the IP adress, I need to make sure that XP can correctly map the host name to the IP address. I have tried two options. The first is to modify the hosts file in windows, and the second is to directly modify the IP-hostname pair in the router’s DNS setup. And I prefer the second method.

    The first method:
    use Notepad to open the file “c:windows\system32\drivers\hosts”, or “c:windows\system32\drivers\etc\hosts”
    at NT, it’s c:winnt\system32\drivers\etc\hosts, and add the following line

    192.168.1.4 beast

    which mapped the IP address 192.168.1.4 to my linux machine “beast”. The following link is very useful to me, http://practice.chatserve.com/hosts.html

    In order to set up the hostname on the linux box, I made a change on the /etc/hosts file, which looks like this:
    127.0.0.1 beast.localdomain localhost beast
    192.168.1.4 beast.localdomain localhost beast

    Compile wireless driver for Fedora

    After moving to a new home, I got a wireless router/modem combo with super-G capability from Verizon. So I bought a new wireless Super-G PCI card from Planet for my Dell poweredge 400SC server. The latest Fedora core 3 that I installed on this server, however, didn’t even pick up the card. I had to do some search on Google, and did find some posts of using Madwifi. It was mentioned on http://madwifi.net site that one need to go through a series of steps to install the madwifi driver including installing the kernel source if it’s not available on the server. Even though I did try compiling a new kernel (2.6.10-rc2), in the end, however, I found that probably I only need to install Madwifi on Fedora 3 and there is no need to do anything related to the kernel, because it doesn’t seem to matter which kernel I used once I installed the Madwifi.

    According to the Howto on http://madwifi.net, I have to download the madwifi file. I went to http://www.madwifi.net/Install-HOWTO/Drivers/madwifi/1.SourceForge.Madwifi.Drivers/
    (Note: The new link is now at http://www.madwifi.net/Downloads/1.SourceForge.Madwifi.Drivers/ on July 4th, 2005) and picked a latest version of 11/20/2004 (http://www.madwifi.net/Install-HOWTO/Drivers/madwifi/1.SourceForge.Madwifi.Drivers/madwifi-20041120.tgz). When I tried to compile it using “make”, it, however, complained that there is no program “uudecode” in my system. Anyway, I had to go to a mirror site of Redhat to download the RPM file sharutils-4.2.1-22.i386.rpm, which contains the uudecode program. The path of the file is /pub/distributions/fedora/linux/core/3/i386/os/Fedora/RPMS/.

    $ cd madwifi-20041120
    $ make
    $ make install

    After installing the driver, I rebooted the machine. I was happy to see that the Kuzu indeed picked up the wireless card. The machine hung there for a couple of minutes to set up this card before giving up. After returning to KDE desktop, I click “System Settings” -> “Network”, and found that my wireless card was listed as ath0 along with the ethernet card eth0. I double clicked this card and entered a configuration menu for this card. On the menu, I found a “Wireless Setting”, from which, I could set up the SSID, channel and password etc. After that, I clicked “Activate” for the card, and bing-go, the card comes out successfully 🙂 (Note: in the new Fedora 4, I have to click menu New-> Wireless connection -> Forward, and then configure the card).

    BTW, I wrote down the kernel compiling step below anyway because it did cost me most of the time, although maybe for nothing.

    First, I go to http://www.kernel.org to download the latest stable Linux kernel, which is 2.6.9. But I got an error related to a SCSI driver while compiling it, like “drivers/scsi/qla2xxx/qla_os.c compile failed …”

    I can’t believe why it was called a stable release even it failed in a simple compilation on the latest redhat platform 🙁 Anyway, I had to download the new kernel patch again from kernel.org, and apply the patch.

    $ cd linux-2.6.9
    $ patch -p1 < ../patch-2.6.10-rc2 $ make menuconfig $ make $ mv bzImage /boot/vmlinuz-2.6.10-rc2 $ mv System.map /boot/System.map-2.6.10-rc2 $ vi /boot/grub/grub.conf and add the following lines title Linux 2.6.10-rc2 root (hd0,0) kernel /boot/vmlinuz-2.6.10-rc2 ro root=LABEL=/ rhgb quiet After rebooting, it looks like grub has difficulty reckening the file system, I might need to generate and add the initrd settings.

    Blog spam

    My site was hit by several comment spams right after I installed WordPress, which forced me to look for good filters to kill those bastards. This link ( http://www.tamba2.org.uk/wordpress/spam/ ) really helps.