Sunday, April 27, 2008

How to Play Encrypted DVDs in Hardy

In order to play DVDs you need to install the Medibuntu Repository and a couple of packages.


This will add the Medibuntu repository to your repository lists
In a terminal type:
sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list

Then you have to add the GPG Key to authentic the packages
In a terminal type:
wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add -

Now update your system to load the Medibuntu repository into your apt-get sources
sudo apt-get update

Download the DVDs playback packages
In a terminal type:
sudo apt-get install libdvdcss2 libdvdread3

Friday, April 25, 2008

Read usb pen drive on ubuntu server

Insert pen drive and cehck the file below to see how the USB stick is being recognized:

sudo vi /var/log/messages

Apr 25 17:46:29 lmnuknet03 kernel: [19465.773928] usb 4-5: new high speed USB device using ehci_hcd and address 2
Apr 25 17:46:29 lmnuknet03 kernel: [19465.927909] usb 4-5: configuration #1 chosen from 1 choice
Apr 25 17:46:29 lmnuknet03 kernel: [19465.993713] usbcore: registered new interface driver libusual
Apr 25 17:46:29 lmnuknet03 kernel: [19466.008173] Initializing USB Mass Storage driver...
Apr 25 17:46:29 lmnuknet03 kernel: [19466.010379] scsi4 : SCSI emulation for USB Mass Storage devices
Apr 25 17:46:29 lmnuknet03 kernel: [19466.011834] usbcore: registered new interface driver usb-storage
Apr 25 17:46:29 lmnuknet03 kernel: [19466.011843] USB Mass Storage support registered.
Apr 25 17:46:34 lmnuknet03 kernel: [19470.992039] scsi 4:0:0:0: Direct-Access Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 0 CCS
Apr 25 17:46:35 lmnuknet03 kernel: [19471.530326] sd 4:0:0:0: [sdb] 977664 512-byte hardware sectors (501 MB)
Apr 25 17:46:35 lmnuknet03 kernel: [19471.531203] sd 4:0:0:0: [sdb] Write Protect is off
Apr 25 17:46:35 lmnuknet03 kernel: [19471.533813] sd 4:0:0:0: [sdb] 977664 512-byte hardware sectors (501 MB)
Apr 25 17:46:35 lmnuknet03 kernel: [19471.534442] sd 4:0:0:0: [sdb] Write Protect is off
Apr 25 17:46:35 lmnuknet03 kernel: [19471.534473] sdb: sdb1
Apr 25 17:46:35 lmnuknet03 kernel: [19471.535263] sd 4:0:0:0: [sdb] Attached SCSI removable disk
Apr 25 17:46:35 lmnuknet03 kernel: [19471.535315] sd 4:0:0:0: Attached scsi generic sg2 type 0



Create a directory where to mount the drive. Example is:
$mkdir /tmp/pen

Mount the pen drive on the new directory:
$sudo mount /dev/sdb1 -t auto /tmp/pen

Access the files:
$cd /tmp/pen

Tftp server ubuntu

Install TFTT application:

apt-get install tftpd-hpa

Edit the following file as follows:

$sudo vi /etc/default/tftpd-hpa
# /etc/default/tftpd-hpa
RUN_DAEMON="yes" -----> CHANGED FROM "NO"
OPTIONS="-l -s /home/pxetero/"

Start the process:

$sudo /etc/init.d/tftpd-hpa start

Check the application is set up:

$sudo /etc/inted.conf
#:BOOT: TFTP Service is provided primarly for booting. Most sites
# run this only on machines as "boot servers".
tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot

Thursday, April 17, 2008

ntpadate/nagios

Just a couple of notes..

Nagios --> after changes run:

582 /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
583 /etc/init.d/nagios restart

Ntpdate --> run

595 ntpdate xxx.xxx.xxx.xxx

Nagios --> Configure Nagios to automatically start when the system boots.

#ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios


Nagios --> add users
a) create the user
htpasswd /usr/local/nagios/etc/htpasswd.users username
b) give rights to see hosts/services/etc.
vi /usr/local/nagios/etc/cfig.cfg