Tuesday, December 9, 2008

Removing Mailman Archives

The mailman web interface is so unfriendly and unable to do lots of works. For example you can't edit the email archives. This is a great reference to overcome this problem:
http://wiki.list.org/pages/viewpage.action?pageId=4030681
Please note that this command may not work for you:
  cd ~mailman
Instead, you should go to '/var/lib/mailman/bin' directory. Also note that, 'arch' is a utility offered by mailman not your Linux distro. So you must enter ./arch instead of arch alone.

Sunday, November 23, 2008

Avoiding to remove /tmp automatically


In my Debian etch server, the /tmp was deleting after each restart. I was looking for some schedule task or some trojan/rootkit in the kernel that can delete /tmp without any authorizing.

At last I found /etc/default/rcS which has some jobs scheduled after each system boot up. According to its man page:
rcS - variables that affect the behavior of boot scripts

This file had some entry about TMPTIME:
On boot the files in /tmp will be deleted if their modification time is more than TMPTIME days ago. A value of 0 means that files are removed regardless of age. If you don't want the system to clean /tmp then set TMPTIME to a negative value (e.g., -1) or to the word infinite.

I change my TMPTIME to -1 and everything became natural :D
Thanks to this mailing list.

Sunday, November 9, 2008

WSUS Logs on Clients

I installed WSUS 3 on Windows 2003 SP2 and configured my Windows XP Professional SP3 clients to use it to update. (I defined this in Group Policy of windows)

But after that I need a way to test whether it works or not. At last I found a log file located at: %Windir%\WindowsUpdate.log

This file contains a lot of useful information about the client and server interaction. The sample log is here:


+++++++++++ PT: Synchronizing server updates +++++++++++
+ ServiceId = {SomeID}, Server URL = http://MyServer/ClientWebService/client.asmx
WARNING: Cached cookie has expired or new PID is available
Initializing simple targeting cookie, clientId = SomeID, target group = , DNS name = MyPC
Server URL = http://MyServer/SimpleAuthWebService/SimpleAuth.asmx
* Added update {11D06C29-6F79-4843-AF63-02811FF01887}.100 to search result
* Added update {AE9F992A-D0A6-44FF-BFC2-CB87ACCF701B}.100 to search result
* Added update {D1F84C75-F914-4FC7-94D5-446DC7987844}.102 to search result
* Added update {79AE03DF-D6EB-4DE2-B59F-37E963D7A69E}.100 to search result
* Added update {E174AF91-A808-44CE-8936-B425F4581B03}.100 to search result
* Added update {26DA5716-5999-4AB2-8806-800F7AF93C93}.107 to search result
* Added update {D3AC165E-D7C4-4BDF-83F0-E249ECBE873B}.104 to search result
* Added update {2BE6143C-5547-4FEE-AFC6-37CD3D2D585D}.101 to search result
* Added update {ED0D8850-60F4-48FC-BD76-49EED8A6F341}.106 to search result
* Added update {278BB66C-CE54-40FB-A5A2-AE55804C3917}.106 to search result
* Added update {70D41FF9-0796-4EB6-A699-61C04CB395FE}.100 to search result
* Added update {27D0A4B7-77C3-48A9-90D3-F67368BB0E37}.107 to search result
* Added update {EDABB0FE-1B6A-478B-806B-7FFFD044B2EE}.100 to search result
* Added update {44F3BFC5-1C64-41E2-839D-A91407634BAB}.101 to search result
* Added update {D5EADB3B-4FD7-4087-8B9D-4ACB2B41210E}.109 to search result
* Found 15 updates and 46 categories in search; evaluated appl. rules of 545 out of 776 deployed entities
*********
** END ** Agent: Finding updates [CallerId = AutomaticUpdates]
*************

Thanks to WSUS wiki for its good article.

Thursday, October 30, 2008

Making ISO Images in Linux

Traditionally I used UltraISO to make my ISO images in Windows. As a linux power user, I needed a way to directly making my ISO images in it. Hopefully linux has a good tool called: mkisofs
My system hadn't it so I needed to install it first:
MyServer:~# aptitude install mkisofs
After that I typed this command to make an ISO file:
mkisofs -o /tmp/cd.iso /tmp/directory/
But it has a weak point! mkisofs, by default doesn't go deeply in directories. So you must force it to do by "-D" switch:
mkisofs -D -o /tmp/cd.iso /tmp/directory/
Also we can make an ISO image directly from CD, DVD or our SCSI optical drive:
dd if=/dev/dvd of=dvd.iso # for dvd
dd if=/dev/cdrom of=cd.iso # for cdrom
dd if=/dev/scd0 of=cd.iso # if cdrom is scsi
That's it :D. Thanks to Scott Granneman for his guide.

Monday, October 6, 2008

Administrating Mailman from Shell

Some useful commands for administrating mailman from shell:

  1. add_members -> Add members to a list from the command line.
  2. check_db -> Check the integrity of a list's database file
  3. check_perms -> Check permissions of Mailman's files
  4. clone_member -> Clone a Mailman subscriber address
  5. config_list -> Configure a Mailman list from a text file description
  6. find_member -> Find all Mailman lists that a member's address is on
  7. list_admins -> List all the owners of a Mailman mailing list.
  8. list_lists -> List all Mailman mailing lists on this host
  9. list_members -> List all the members of a Mailman list
  10. mmarch -> Rebuild a Mailman list's archive.
  11. mmsitepass -> Set the Mailman site password, prompting from the terminal.
  12. newlist -> Create a new, unpopulated mailing list.
  13. rmlist -> Remove the components of a mailing list with impunity - beware!
  14. remove_members -> Remove members from a list.
  15. sync_members -> Synchronize a mailing list's membership with a flat file.
  16. withlist -> General framework for interacting with a mailing list object.

Sunday, September 7, 2008

Reseting Mailman Password

Mailman is free software for managing electronic mail discussion and e-newsletter lists. Mailman is integrated with the web, making it easy for users to manage their accounts and for list owners to administer their lists. Mailman supports built-in archiving, automatic bounce processing, content filtering, digest delivery, spam filters, and more. For more info about it, take a look at its homepage.

I had not the mailman "system-wide administrator-password". So I restarted its password by running "mmsitepass" as root. It asked me a new password. Once this password is known by the overall Mailman-admin, they can log into the list's admin-pages and set a new list-specific admin-password. Thanks Markus Amersdorfer for its great article.

Tuesday, May 20, 2008

Downloading Clips From YouTube Without Any Tool

As you know, YouTube is a movie sharing service on the web. Lots of people upload their clips on it. I think its a two-sided knif: It can be harmful or useful. (like other web services!)

Here I'm going to tell how to download movies from YouTube to you hard disk and keep it forever for yourselves.

Assume this URL:
http://www.youtube.com/watch?v=QYy6fIk3A20

Open this URL by your favorite web browser. Wait until the page (not movie) loaded. Then go to "Page Source". Search for "video_id". You'll find something like this: (Don't pay attention to other search results, you need only the fullscreenUrl):

var fullscreenUrl = '/watch_fullscreen?fs=1&vq=None&video_id=QYy6fIk3A20&l=35&sk=nx42RolSOgvEwZkzlA1RKeus1v19_fNMC&fmt_map=&t=OEgsToPDskLlRMjJ2joW3LqApGKpwLcY&hl=en&plid=AARNovEMmwHAvd6yAAAAgAAAAAA&title=a beginning for my FPGA studies, part 2';
Just copy the front term of video_id:
QYy6fIk3A20&l=35&sk=nx42RolSOgvEwZkzlA1RKeus1v19_fNMC&fmt_map=&t=OEgsToPDskLlRMjJ2joW3LqApGKpwLcY&hl=en&plid=AARNovEMmwHAvd6yAAAAgAAAAAA&title=a beginning for my FPGA studies, part 2
At last make your final downloadable URL as below:

"http://www.youtube.com/get_video?video_id=QYy6fIk3A20&l=35&sk=nx42RolSOgvEwZkzlA1RKeus1v19_fNMC&fmt_map=&t=OEgsToPDskLlRMjJ2joW3LqApGKpwLcY&hl=en&plid=AARNovEMmwHAvd6yAAAAgAAAAAA&title=a beginning for my FPGA studies, part 2"

The name of your file would be the name becomes in front of title (in the video_id):
a beginning for my FPGA studies, part 2.flv

You can also download your movie with "DownloadHelper" extension of Firefox. This extension works exactly with the above method!

Thanks to

Saturday, March 29, 2008

The Merciful Google!!!

Do you remember the history of Gmail? At first, you must had an invitation to subscribe to it. I was searching a lot those days and at last one of my friends (that had a Gmail account) invited me to the Gmail. About 1 year ago, Gmail opened its subscription for the public and skipped its beta stage.

Google always claimed that its income source was the "Text Ads". But some days ago, I found a new setting in my Gmail account: Web Clips.
You can freely turn off the "Web Clips" to disable showing ads!!! Now the question is: What is the Google's revenue for hosting Gmail?! Is Google love us and doesn't like to bother us by even "Text Ads"?! I hope the Google's revenue wasn't and isn't our "Personal Information".

Sunday, March 16, 2008

Free Download from MegaUpload as a Premuim User

Yesterday I found two files which was on the megaupload server. These files are so big (about 150MB & 250MB) and I couldn't download them as a free user with my home dial-up connection. After lots of investigation, I found two "Megaupload Premium Link Generators". So I entered my links in them and got 2 direct links.

At last I entered them in my university shell account to being downloaded by wget. These are that sites:

Friday, March 7, 2008

Customizing the Separator Line for Your Word 2007 Document's Footnotes

Sometimes you want to change the footnote size, direction (e.g. in right to left languages such as Farsi), etc. Follow this technique to reach the settings for footnotes:
  1. Goto "View" tab (menu) and select "Draft" in "Document Views".
  2. Goto "Reference" tab and select "Show Notes" in "Footnotes".
  3. A window appears on the bottom of the screen. Select "Footnote Separator" from the drop-down menu on this screen.
  4. Micro$oft word shows you the line and now you can customize it according to your need.

Thanks to TechRepublic for its tip about Word 2003!

Sunday, February 24, 2008

JAVA Difficulties (Java Sound)

For our JAVA course project we must write a media player which supports WAV and MP3. The WAV support is straight forward but MP3 need lots of struggling. The most important constraint is that we must only used javax.sound API not more. This API's documentation is very poor and provide a low level access to sound card. I found 3 resources that help me to finish my project after about 20 days:

Java Sound Resources: This site has lots of valuable examples. Also it has some great FAQs.

Tritonus: Open Source Java Sound Tritonus implemented its own JAVA sound. But it works only on linux (poor windows!). Also it offers some plug-ins that add some SPI (Service Provider Interface) to Sun Java Sound. E.g. adding MP3 support. But unfortunately it lacks supporting of professional MP3s. (I.e. it can't play tagged MP3s) But it was a good start for me!

Java News - JavaZOOM: It offers a great MP3 SPI and has some good examples.

At last I used the JavaZoom plug-ins to play MP3 sounds. But if you've not under any restriction, I suggest to use JMF (Java Media Framework). This framework was written by Sun, Intel and Silicon Graphics and was really easy to use and bug-free (As far as I tested)

Sunday, January 27, 2008

LDAP Problem or Debian Problem

Yesterday, I opened a "screen" and try to update and upgrade the distro via "apt-get update" and "apt-get upgrade". I left it open, and when I opened the detached screen, I see a window that told me to reboot the system as soon as possible. Imagine that if it was an important server, this reboot was a horrible work. But hopefully, this was only a Computer Engineering Department shell server ;)

I restarted it, but when it booted, the LDAP users couldn't login any more. After lots of investigation, I found that I must change the /etc/nsswitch.conf and /etc/libnss-ldap.conf and /etc/ldap/ldap.conf to their previous settings! I don't know why Debian change my configuration file. I didn't expect this work from Debian security team.

Fortunately , the server is now OK. I've an I idea about upgrading the old FreeBSD machine in the Department to a new one (FreeBSD 6.3). I think FreeBSD is great. Debian is for lazy administrators and I don't wanna be a lazy admin ;)

Server Transportation

Yesterday, I transfered CE shell server to a new and great one. The new one specs is as follows:
HP ProLiant DL380 G5 with Dual Quad Core Xeon 2.3Ghz and 4GB RAM!
And the old one:
Gigabyte 6VXD7 with Dual Core Pentium III 1Ghz and 1GB RAM. In fact this was a desktop computer.

I hope this extreme change will increase the uptime of the server a lot. Another advantage is server load decreases significantly as I expected.

The hardest part of migration was copying MySQL. First I tried to dump it and import it with this command:
Dump: mysqldump -u root -p --all-databases>back.sql
---> I transfered "back.sql" to new server and then:
Import: mysql -u root -p <back.sql
It worked but the problem was the permissions doesn't remain as was! All databases became belonged to root and no one can access to his/her database. After lots of investigation, I remembered the golden sentence in *nix world:
Everything in *nix are FILES.
First I stopped the mysql server on both computers, and then I copied /var/lib/mysql with rsync from old server to new one. Then I started the mysql daemon and wow! Everything works perfectly as I want.

Wednesday, January 9, 2008

Damaging Srv3!

Last night, I killed the sshd daemon in the srv3 to get rid of zombie processes. Unfortunately, I was root and I cut my sshd server connection. So, now I can't connect to it! (Because there was no ssh server process remained on the srv3 ) The only solution remains for me is to restart the server :-(

Absolute Zero!

Hi all, This is my first post. I intend to write some useful experiences in my field, Computer Engineering and share them. I hope you enjoy it ;)