Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

15 Oct 2011

Gentoo on Thinkpad T410: authen using fingerprint (gdm)

Step 1:
Download 2 ebuild files named: fingerprint-gui and upekbsapi-bin from this website http://gpo.zugaina.org.
Step 2: Create digest manifest file for them
cd /usr/portage/sys-auth
mkdir {fingerprint-gui, upekbsapi-bin} 
Copy fingerprint-gui-1.00.ebuild and fingerprint-gui-1.00.ebuild to these directories.
ebuild fingerprint-gui-1.00.ebuild digest 
ebuild  upekbsapi-bin-4.0.0218.ebuild digest 

Step 3: unmark  using package.keywords and install
emerge sys-auth/fingerprint-gui 
it shoud install both fingerprint-gui and upekbsapi-bin

Step 4: unmark libfprint and install it
Step 5: load fingerprint-gui and follow the installation steps to scan and verify your finger.
Step 6: Adding fingerprint-gui into pam and gdm

cat /etc/pam.d/system-auth
auth        required    pam_env.so
auth        sufficient  pam_fingerprint-gui.so try_first_identified
auth        required    pam_unix.so try_first_pass likeauth nullok
auth        optional    pam_permit.so
account        required    pam_unix.so
account        optional    pam_permit.so



cat /etc/pam.d/gdm
#%PAM-1.0
auth optional pam_fingerprint-gui.so -d
auth       optional        pam_env.so
auth       include        system-login
auth       required        pam_nologin.so

account    include        system-login


Logout and login to test new authentication method ;-)


27 Feb 2011

Sự cần thiết của một hệ thống cảnh báo

Trước giờ mình luôn nghĩ hệ thống Monitoring (default + bản thân tự customize) đã đủ đáp ứng được nhu cầu:
-Phát hiện ra sự cố
-Cảnh báo kịp thời
-Có khả năng phục hồi hệ thống một cách nhanh nhất

Nhưng mình phát hiện ý nghĩ đó là sai khi tiếp cận với hệ thống cảnh báo của những người làm chuyên nghiệp (dù chỉ tiếp cận qua những gì họ giới thiệu) và sự cố network vừa qua tại công ty mà mình đang làm việc.
Sự cố network xảy ra làm ngưng trệ hầu như tất cả các sản phẩm đang hoạt động. Không biết bạn có cảm giác thế nào khi hệ thống cảnh báo tất cả server (hàng trăm) đều trong trạng thái “DOWN”, mình thì gần như buông tay.
Thứ nhất tuy hệ thống network không thuộc phạm vi quản lí của team mình, nhưng hệ thống monitor phải detect được sự cố network đó ngay khi nó vừa xảy ra, nhưng đã không làm được việc.
Thứ 2, khi sự cố network được giải quyết, dù mạng đã thông nhưng service vẫn gặp sự cố dù hệ thống cảnh báo cho biết tình trạng tất cả service đều bình thường.

20 Sept 2009

[Toy] Download nhạc từ Dreammedia.ru

Đây là script mà tôi dùng để thuyết trình trong sfd 2009, cách sử dụng rất đơn giản, copy nội dung dưới đây, lưu lại với tên tùy ý [dot]sh, chmod +x file, dạo một vòng dreammedia.ru, chọn ban nhạc và tên album yêu thích, chạy script, nhập thông tin yêu cầu và download nhạc về.
#!/bin/bash
url="http://dreammedia.ru"
username=`whoami`
path="/home/$username"
input="$path/playlist.xml"
output="$path/playlist.txt"

read -p 'Enter name of band you want to download: ' band

echo
read -p 'Enter name of Album, include space if it has: ' album
playlist="http://dreammedia.ru/playlist/$band/$album/playlist.xml"
wget -O $input "$playlist"
if test ! -s $input 
then
echo 'Cannot get playlist, sorry!'
rm -f $path/playlist.xml
exit 1
else
echo 'Got it'
echo 'Start this game'
touch $output 
cat $input | awk -F '[<>]' '/mp3/{print $3}' | sed 's/\ /%20/g'> $output
fi
for i in `more $output` 
do
echo Downloading
wget  "$url$i"
done
exit 0


Chỉ có thế, ko có gì nói thêm :-D


12 Jul 2009

LVM, add new logical partition to existing LV

Format that partition using mkfs:
[root@home cappuccino]# mkfs.ext4 /dev/sda8

Initialize it

[root@home cappuccino]# pvcreate /dev/sda8
add to existing VG:

[root@home cappuccino]# vgextend vg_home /dev/sda8
use it:
[root@home cappuccino]# lvresize /dev/vg_home/lv_root -L +3.93G
final step: boot into single user mode, and active new space for Logical volume group:

1 Jul 2009

Tạp

Hôm qua thức khuya, lang thang đây đó vào blog của Lê Ngọc Hiếu (mybb) thì đọc được cái này, thực sự không hiểu nổi người đã cất công viết được một bài viết dài như thế lại không kiếm được một tấm hình của Hải quân VN, lười quá đành đem hình...hải quân Trung Quốc vào thế. Vô tình hay hữu ý?

28 Jun 2009

still vmware workstation

Fedora 11, I think vmware workstation doesn't completely support latest release of Fedora, I got many problems with vmware run on F11.

Whenever I stop vmware workstation, it cannot fully stop, many vm processes are still running until I do a force kill, and today I got new problem,

25 Jun 2009

VMWare workstation: why Virtual Machine cannot start?

Not sure if users don't use Fedora get this error or not, but if you face with this error message:

unable to change virtual machine power state cannot find a valid peer process to connect to.

and your Virtual machine cannot start, my solution:

VMWare workstation 6.5.2, Fedora 11

you're using Fedora 11 and VMWare workstation not working? there are some troubles with kernel 2.6.29 and VMWare new version. Follow this steps:

saigonlug 1st meeting



Từ phone


just got this picture tonight from AnNguyen's blog(the one who stand when everyone sits on their chair, lol).
the photo took at the 1st meeting of Saigonlug, can you guess who am I? :-p

22 Jun 2009

Gentoo, my new box


here's make.conf file for my lappy, dell vostro 1400: intel t5470, 2GB ram with intel gma X3100.
with this config file, problem is around, haha. But no problem, this's time to try.

20 Jun 2009

gentoo?



( http://www.gentoo.org/ )

Gentoo Linux is a special flavor of Linux that can be automatically optimized and customized for just about any application or need. Extreme performance, configurability and a top-notch user and developer community are all hallmarks of the Gentoo experience.

May not be suitable because:

  • Appropriate for more experienced users

  • Time to change.

    18 Jun 2009

    Fedora 11, vbox error

    vbox cannot start:

    FATAL: Module vboxdrv not found.
    FATAL: Module vboxnetflt not found.


    Solution:
    1. run uname -a to know your kernel version

    Disqus