MikeTeo.net

A Software Technologist's Blog (Wanna Email Me?)

Archive for the ‘System Administration’ Category

 

I have noticed that there are quite a few requests for a network scanning application to search for Windows shared folders.
I thought this will be an interesting implementation for pysmb (a pure Python implementation of the SMB1 and SMB2 protocol that supports the Windows file sharing functionality) as well as for developers who are learning to use pysmb for their applications.

You will need Python 2.4 and above, and have installed pyasn1 and pysmb. Next, download the ScanNetworkForSMB.py script. Then, run the script with 1 IP address to scan for a single machine, or a start/end IP address pair to scan a range of IP addresses. If the scanned machine has its Windows sharing port (port 137) active, the script will print out its IP address together with the names associated with this machine.

Sample output

$bash> python ScanNetworkForSMB.py 192.168.1.2 192.168.1.256
Beginning scanning 255 IP addresses...

     192.168.1.2 --> CETUS WORKGROUP
   192.168.1.109 --> I7PC WORKGROUP

Query timeout. No replies from 253 IP addresses
 

I have just upgraded the lighttpd service to 1.4.20 for some of my Linux boxes which are running on a very old Fedora Core 5 distro.

The RPMs are available at the following URLs and generated from a modified specs file from DAGs.

 

I have tried overriding my resolv.conf nameservers with OpenDNS on Fedora Core 9 so that the domain names get resolved faster.

  1. Ensure that your network is able to get a dynamic IP from your ISP’s dhcp server.
  2. Locate your dhclient configuration for your interface. For my machine, the file is /etc/dhclient-eth0.conf.
  3. Then add the following 2 lines to this configuration file.
prepend domain-name-servers 208.67.222.222;
prepend domain-name-servers 208.67.220.220;

Now restarting your NetworkManager, and you should see that the OpenDNS nameservers are prepended before your ISP’s nameservers.

 

Fedora Core 9 provides a java 1.6 plugin for the FireFox. However, I have found that it doesn’t work for some of the web sites, in particular, my Internet banking and fansub.tv. This post describes what I have done to get my Java applets to work in FireFox.

  1. Download JDK 6 update 6 (bin version, not the rpm) from java.sun.com. I believe there is also a similar plugin in Java SE 6 runtime as well.
  2. Run the jdk-6u6-linux-i586.bin file. If you get a permission error, try “sh jdk-6u6-linux-i586.bin file” on your terminal. Simply follow the instructions and complete the unpacking process. You should have a new folder called jdk1.6.0_06.
  3. Move this folder to /usr/local. You may need to sign in as root to do this.
  4. In your home folder, create a symbolic link to the Java plugin like this: “ln -s /usr/local/jdk1.6.0_06/jre/plugin/i386/ns7/libjavaplugin_oji.so ~/.mozilla/plugins/libjavaplugin_oji.so
  5. Remove the openJDK web browser plugin that is currently installed on your system: “rpm -e java-1.6.0-openjdk-plugin
  6. Restart your FireFox. On the address bar, type “about:plugins“. You should see a section called Java(TM) Plug-in 1.6.0_06-b02 with the corresponding Java MIME-Type that have associated with this plugin. Your applets should work now.
 

My home gateway machine is a 5-year old Intel P4 2.4GHz machine running FC8. This machine has undergone a few Fedora upgrades from FC5 to FC7 and then to FC8. The hard disks have been replaced 3 times, and the partitions have been messed up because the hard disk replacements are often larger in capacity than the burn outs.

The upgrade this time is a clean installation of Fedora Core 9 with a couple of new hardware–a new LG DVD superwriter, Adaptec 1420SA SATA-II RAID controller and 2 x WD Caviar SE16 640GB hard disks. There were minor glitches during the installation, but they were resolved through the abundant information available on the Internet.

Read the rest of this entry »