Friday, December 26, 2008

SL Radio channels on mplayer

Lots of Sri Lankan online radio stations seem to require Windows Media Player plugin or some other plugin when you try to access them over the Internet. Went through a couple of those radio channels finding out which urls that can be used with mplayer. Below are the findings, hope they will come to some use. I currently only listen to YesFM, and YesFM only. YesFM -> http://174.133.224.53/yesfm TNL Rocks -> http://220.247.224.89/live Lite FM -> http://222.165.133.161/live Y FM -> http://174.133.224.53/yfm E FM -> http://69.80.238.25 Shakthi FM -> http://174.133.224.53/shakthifm Neth FM -> http://38.96.148.49:5552 Sirasa FM -> http://174.133.224.53/sirasafm MAX Radio -> http://75.125.239.34:7045 As an example, to listen to YesFM, you can use mplayer http://174.133.224.53/yesfm This link helped quite a lot in finding out the Radio Channel web sites.

Wednesday, December 24, 2008

vim stuff

note to self I keep forgetting this, and i want to kick my self hard so i won't!!! Even then I'm not sure i won't forget this! To append some common text to all the lines in a text file with vi/vim, below can be used. :%s/$/some text \t = Tab Space

Thursday, December 04, 2008

Counter-Strike 1.6 on Wine

I wanted to play this game Counter-Strike, for some time now..and yesterday i got some free time to try this out. Actually it was pretty easy to get it to work on my Fedora9 with Wine. Only thing i had to do manually was to copy this msvbvm60.dll from a M$ Windows machine to .wine/drive_c/windows/system32/ The graphics get a bit jerky when the game is starting up, and once it loads up its quite smooth. Btw The installer wizard was filled with some strange looking characters instead of the instructions, but i guess i got the correct buttons when i clicked. Shouldn't be hard. This would be the second FPS game i had luck with over wine., Unreal tournament being the 1st.

Friday, November 28, 2008

yum stuff

note to self When creating yum repositories with RHEL5 installation media, use createrepo -g with the comps-*.xml files inside {Server, Cluster, ClusterStorage, VT}/repodata directories. createrepo -g will add the necessary meta-data on to the repo, necessary for yum group functions to work properly. Eg. yum grouplist, yum groupinstall

Monday, November 03, 2008

Enabling basic authentication in Squid

Found this in my gmail archive and thought it would be easier to have it on my blog. 
 I had replied with this to someone on the lug.lk mailing list. 

Actually noticed an error on my reply as well, which is corrected on the below. 

 -2007-08-01 

Squid supports lot of authentication methods. I'll put the basic method that uses ncsa_auth program. 
You need to make the following changes to your squid.conf. 

Please be advised that the below, gives only a very basic proxy setup with authentication. 

 If you want something complex, you might want to the squid documentation. 

**Backup your existing squid.conf

Put/uncomment following lines to your squid.conf

auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd 

ncsa_auth program is installed along squid in redhat flavours, under /usr/lib/squid/ . 
"/etc/squid/passwd" is the name of the file where all the passwords will be kept. 
You can change this to point to wherever you want in the file system. 

auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off 

First line below is an ACL named "authenticated_user" Second line defines the networks in the LAN. 
This should be changed according to your setup. ( i just copied over from def: squid.configuration :-) )

The third allows http access through the proxy for Authenticated connections coming from the specified networks. 

acl authenticated_user proxy_auth REQUIRED 
acl our_networks src 192.168.1.0/24 192.168.2.0/24 
http_access allow our_networks authenticated_user

Once you have made the above changes to the squid.conf you have to create the username/passwords in the specified file. ( /etc/squid/squid_passwd in this ) 

For that, do, htpasswd -c /etc/squid/squid_passwd username password 

After adding the 1st user in the above way, to add more new users, use the below method. 

htpasswd /etc/squid/squid_passwd username password 

You can find out various parameters you can use with htpasswd from the man page. 

When everything is done, simply restart the squid service.. 

If you want squid to connect to a separate service for authentication, refer to the squid documentation, there are quite a few methods that are currently supported.

Monday, October 13, 2008

Kernel versions on different RHELs...

note to self When ever you need to find out a kernel version of a particular RHEL version or an update, you can head over to this Knowledge Base Article. Hope they are keeping it up-to-date. Below is what it contains right now.
Red Hat Enterprise Linux
Update v. 2.1 v. 3 v. 4 v. 5
GA 2.4.9-e.3 2.4.21-4 2.6.9-5 2.6.18-8
U1 2.4.9-e.12 2.4.21-9 2.6.9-11 2.6.18-53
U2 2.4.9-e.24 2.4.21-15 2.6.9-22 2.6.18-92
U3 2.4.9-e.34 2.4.21-20 2.6.9-34 -
U4 2.4.9-e.40 2.4.21-27 2.6.9-42 -
U5 2.4.9-e.49 2.4.21-32 2.6.9-55 -
U6 2.4.9-e.57 2.4.21-37 2.6.9-67 -
U7 - 2.4.21-40 2.6.9-78 -
U8 - 2.4.21-47 - -
U9 - 2.4.21-50 - -

Old CentOS/RHEL packages

note to self When there is a need for an old RHEL or CentOS rpm, head over to http://vault.centos.org. They keep an archive of package trees of previous CentOS releases. It can not be used as a yum repo, but its good enough if you know what you need exactly. The security updates are not put in there, but this works for me.. -- Thank You CentOS.! :)

its rpm-build NOT rpmbuild..!

note to self "rpmbuild" is the tool used to build rpms ( something like a .deb in Debian flavours ). Whenever i want to build a rpm on a system where i don't have rpmbuild installed, its quite easy to get it installed on the system using "yum". The problem ( - not exactly a problem, just something that keeps on happening to me ) is that when i do "yum install rpmbuild" yum doesn't output what i need. Instead it outputs stuff which are not really even related to my requirement. The program that provides rpmbuild is named "rpm-build", which keeps causing me this problem. :( The packages given as results from yum, when the query string is given as "rpmbuild", all seem to have the word "rpmbuild" on their "info" meta data, but its strange, and quite frankly annoying that "rpm-build" ( the actual package that provides "rpmbuild" ) doesn't have the key "rpmbuild" which could be the reason for this. And, before i forget, the correct way would be "yum install rpm-build" :) I hate that i keep forgetting these.!!!

Friday, October 03, 2008

port forwarding using ssh

note to self ssh can be used in the below way to forward traffic over a secure channel, to make otherwise un-secure ( plain ) traffic to be encrypted. ssh access to the destination sever is required for this to work. For an example, to secure POP3 communications with a mail server at a.b.c.d one can do something like below on their local machine. ssh -N -f -L 127.0.0.1:1100:a.b.c.d:110 user@a.b.c.d -f is to put the connection to the background -N to wait infinitely for incoming connections -L binds the tunnel to the specified port ( 1100 in this case ) this will create a ssh tunnel bound to the local port 1100 with port 110 of a.b.c.d @a.b.c.d performs the authentication via ssh with the a.b.c.d once this is done, the POP client can be re-configured to talk to local port 1100. ssh will happily encrypt and decrypt what you put in the tunnel from the end-points. This mechanism can be used to secure systems that are not built with such capabilities. when you want to stop the tunnel, you can simply use "kill" -- FAQ at www.openssh.com was quite helpful in figuring this out. thanks bud for pointing out such things can be easily done with ssh. :)

Tuesday, September 02, 2008

squirrelmail preferences

Note to self SquirrelMail keeps user specific preferences, address books in /var/lib/squirrelmail/prefs/ It annoys me, that i keep forgetting this sort of things. Hopefully i won't, again!

Thursday, August 28, 2008

No Audio with YouTube on Fedora?

Audio with Flash player doesn't seem to work on Fedora out-of-the-box. Quite an old thing really, but this is something i keep forgetting..thought of blogging this for my own references. Below is known to fix the problem. #yum install libflashsupport http://fedoraforum.org/forum/showthread.php?t=195224 2009/01/28 Update: Noticed that libflashsupport is not needed and is not there any more on Fedora 10. Installing the flash plugin rpm from Adobe does it.

Friday, May 30, 2008

Very Basic Mail Server setup with Postfix + Dovedot

This is just a very basic overview on setting up a MailServer with Postfix + Dovecot. I'm basing this on a Redhat flavored GNU/Linux, but this should work on other GNU/Linux's as well. 1. Install postfix and dovecot ( ex. if using yum, yum install postfix ) 2. Go in to /etc/postfix dirtectory and re-name the main.cf to main.cf.orig or something similar. 3. Create an empty main.cf myhostname = mail.domain.com mydomain = domain.com myorigin = $mydomain mydestination = domain.com, mail.domain.com, localhost, localhost.localdomain inet_interfaces = all mynetworks = 127.0.0.0/8 local_recipient_maps = unix:passwd.byname, $alias_maps smtpd_sasl_auth_enable = yes broken_sasl_auth_clients = yes smtpd_recipient_restrictions = reject_rbl_client bl.spamcop.net, reject_rbl_client dnsbl.njabl.org, reject_rbl_client cbl.abuseat.org, reject_rbl_client list.dsbl.org, reject_non_fqdn_sender, reject_invalid_hostname, reject_unauth_destination, reject_unlisted_recipient, reject_unauth_destination, reject_unknown_sender_domain, reject_unauth_pipelining, permit_sasl_authenticated, permit_mynetworks 4. Add/Change the below lines in /etc/dovecot.conf protocols = pop3 pop3_listen = * 5. Make sure your /etc/sysconfig/network has the correct FQDN ... HOSTNAME = mail.domain.com .. 6. Make sure your /etc/hosts is correct. 127.0.0.1 localhost.localdomain localhost interface_ip mail.domain.com mail 7. Do chkconfig service_name on for services postfix, dovecot and saslauthd and start the services with the service service_name start command. 8. Create the necessary user accounts with useradd command and assign passwords, and configure your mail clients to use the server for incoming(POP3) and outgoing(SMTP) with authentication. ex: useradd -s /sbin/nologin username ex: passwd username Thats it. You should be good to go..of course you have to have the necessary DNS settings and other changes, depending on your setup ( ex: firewall ), but for the Mail Server configuration, this is pretty much it. Please keep in mind, that this is a very basic setup, and i have not tested the configuration above. This is just in case someone wants to get an idea. There are so many good guides on the net in setting up postfix, just search around for a while and you will see. If you need any help, there is always helpful #postfix on freenode. But please examine the situation well before asking for help, so they can help you better. Other than that, put a comment or reach me at yajith at gmail dot com (yajith@gmail.com). I will help you ( or at least try ) with my limited knowledge.

Friday, April 11, 2008

Installing Pidgin on RHEL5

It's over an year since the last time i wrote something about pidgin on my blog. Yesterday one of my friends installed her machine with RedHat Enterprise Linux 5, the OS that i have come to like so very much ;). During the installation she had forgotten to go in to the detailed package selection dialogs -probably because, on the text mode installation, anaconda keeps the package details hidden in a dialog which you have to access by pressing a function key- and ended up not having pidgin on her installation. A new comer to pidgin, she then went on and downloaded the Pidgin RHEL5 RPMs from the Official pidgin RHEL/CentOS 5 yum-repo as i have told her at a previous time. The problem here is like this. You can't just install the RPMs from there, as they seem to have a few dependencies, most of them are for the package libpurple. Now this by it self is not a problem at all, if you have been using RHEL for sometime, then you would know how to figure out the missing packages from the rpm dependancy error messages, which is what i started doing. There were few packages like cyrus-sasl-MD5 and gtkspell which fixed a lot of errors, but this error regarding some libsilc and silc-client which just wouldn't go away. The funny thing is, when you google for libsilc or silc-client you don't get anything that you can work on really. Yes, it does give you this site http://silcnet.org which seem to belong to them who maintain this component. Little look on to the site revealed that SILC is actually a method or a protocol for secure conference (chat). It actually took me a while to try and install the packages that are there..as they seem to be for Fedora 7, and i wasn't very sure how it might affect the system. SILC Client 1.1.4 SILC Toolkit 1.1.7 Finally, as i couldn't find any RPM for RHEL5 which fulfills my missing packages, i went ahead with the installation of these two packages. The problem still remained, and kept giving me an error. Then i tried a 3rd link from the same site. SILC Pidgin 2.4.0 and after clicking through few links i ended up on a Fedora mirror. I tried searching for the word silc and found this package libsilc which did the job for me finally. So far i have not been able to find a matching set of RPMs for RHEL5 which would install pidgin without a problem, its quite possible im looking at wrong places, but am i. Only place i didn't look in to yet is the CentOS 5 mirrors which could have all i need. But what i'm wondering is what has happned to all these RPM sites with huge collections of RPM, which have been doing a damn good job by the way over the years... Perhaps i should try my hand at creating a few RPMs on my own, and only problem there is i don't yet know how..but hey, rome wasn't built in one day, rite?

Thursday, April 10, 2008

Listen to your CPU

Listen to your CPU..It knows whats best for you. ;) Found this cool way of "listening" to your cpu.. Try this out..and enjoy.. give the below command as root. cat /proc/kcore > /dev/dsp You can stop by pressing "Ctrl+C" when you are done listening. I'm not sure weather this is good or bad for your system, so don't blame me if you get your system screwed..i have already warned ya.

java security exceptions

note to self Found somewhat easy way to get around the annoying java security settings. Simply add the destinations preceded by http://...