星期日, 6月 29, 2008

Group quota in SuSE Linux

之前套用disk quota都是針對個人做 disk quota
比教少針對 group 作 disk quota

實作上要注意一個小細節是該 Partition要有該群組的檔案
不然之後做 quotacheck的會失去效用

之前的小錯誤就是該filesystem沒有該群組的檔案
就去做quotacheck , 結果就是 edquota 看的到
repquota -ag 以及 quota -g groupname 看到的是none
這種神奇的現象
^^

簡單敘述一下流程
  1. 於/etc/fstab內加入 grpquota選項
  2. mount -o remount 該分割區
  3. quotacheck -gv 該分割區
  4. quotaon -g 該分割區
  5. edquota -g 群組名稱
  6. 開始測試, 並使用 repquota -ag 來觀察

^^

星期五, 6月 27, 2008

解決 VMWare在Notebook鍵盤對應的問題

解決 VMWare在Notebook鍵盤對應的問題
之前有碰到VMWare内的OS如果是在Windows PC上面安裝
把印象檔clone到Notebook上面使用的話, 有鍵盤不能使用或是對應不正確的現象

之前一直以為是鍵盤對應的問題, 所以就不以為意
都很勤勞的把source重作 ^___^

但是這次的debian專案是要把進行到一半的debianOS 移到Notebook上面來做
所以就專心一點處理這個問題

所以一開始的方式是去系統內調整鍵盤的對應
去嘗試 標準鍵盤, 微軟鍵盤都沒有效果.

突然去切換 Ctrl + Alt + F1 想說去切換runlevel 試試看
回到圖形介面就可以了
所以就確定不是鍵盤對應的問題

後來爬了一些文章, 應該是 Num Lock鍵的問題(要關閉才會正常, 預設是開啟)
解決的方式應該有兩個, 自己是使用第一個方式才有效
  • 以Thinkpad來說, Num Lock與Scroll Lock是在同一個按鍵, 所以按Shift + Num Lock按鍵就可以把Num Lock關閉, 就可以正常對應
  • 另外爬文有提到 Shift + Enter 也可以關閉, 但是我試了之後沒用, 先記下來
以後就不用那摩辛苦重新作source了
這個很重要
趕快記下來

星期五, 6月 13, 2008

3COM 3CRWE154G72 on OpenSuSE 10.3

之前有一張3com的PCMCIA網卡
在裝Fedora時候有安裝起來使用(因為那個時候內建的網卡沒抓到)
後來抓到內建的Intel網卡就沒有使用

上次心血來潮在OpenSuSE 上面安裝發現沒有連接
昨天找時間Lab 安裝一下
有看了其他人裝這個套件
p54-kmp-default-20070806_2.6.22.17_0.1-2.1
但是沒有效果^^

後來是把光碟內的Driver 複製到 /lib/firmware
cp /media/3ComWLAN/Driver/3CRWE154G72/3C154G72.arm /lib/firmware/isl3890

一切都ok了 @@

那昨天的熬夜到底算啥
>.<

星期三, 6月 04, 2008

停用compiz設定 in Linux

之前曾經因為豬頭啟用 compiz-fusion導致 X Windos 啟動不正常
所以花費了很多時間
之後爬文, 簡單的解決方式是
#touch ~/.config/compiz/disable-compiz
就不會啟動compiz ^^
趕快把他記起來^^~~~~

星期二, 6月 03, 2008

讓VMWare內的網卡可以執行promiscuous mode

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=287

How do I set my virtual Ethernet adapter on my Linux host to run in promiscuous mode?

VMware software does not allow the virtual Ethernet adapter to go into promiscuous mode unless the user running the VMware software has permission to make that setting. This follows the standard Linux practice that only root can put a network interface into promiscuous mode.

When you install and configure your VMware software, you run the installation as root, and we create the vmnet0-vmnet3 devices with root ownership and root group ownership. We also give those devices read/write access for the owner root only. For a user to be able to set the virtual machine's network adapter to promiscuous mode, the user who launches the VMware product needs to have read/write access to the vmnetx device (/dev/vmnet0 if using basic bridged mode).

One way to do this is to create a new group, add the appropriate users to the group, and give that group read/write access to the appropriate device. These changes need to be made on the host operating system as root (su). For example:

chgrp newgroup /dev/vmnet0
chmod g+rw /dev/vmnet0
where newgroup is the group that should have the ability to set vmnet0 to promiscuous mode.

If you want all users to be able to set the virtual network adapter (/dev/vmnet0 in our example) to promiscuous mode, you can simply run the following command on the host operating system as root:

chmod a+rw /dev/vmnet0

More issues regarding promiscuous mode are discussed in Knowledge Base article 514. Please see:

www.vmware.com/support/kb/enduser/std_adp.php?p_faqid=514.

星期五, 4月 18, 2008

iptables LOG 機制 at SuSE Linux

之前在使用RedHat 系列的Linux時候
在使用 iptabls的時候會使用, 例如
#iptables -A INPUT -p icmp --icmp-type 8 -j LOG
來將ping的動作紀錄起來
以RedHat 系列會去檢查 /var/log/messages

但是由於SuSE Linux使用 syslog-ng的關係
在/etc/syslog-ng/syslog-ng.conf 設定中有把iptables 獨立出來
linux-nb:/var/log # cat /etc/syslog-ng/syslog-ng.conf | grep iptables
filter f_iptables { facility(kern) and match("IN=") and match("OUT="); };
filter f_console { level(warn) and facility(kern) and not filter(f_iptables)
filter f_messages { not facility(news, mail) and not filter(f_iptables); };
filter f_warn { level(warn, err, crit) and not filter(f_iptables); };
# All messages except iptables and the facilities news and mail:
# Firewall (iptables) messages in one file:
log { source(src); filter(f_iptables); destination(firewall); };
# Warnings (except iptables) in one file:

所以有關於iptables的LOG在 SuSE Linux 內
會被儲存在/var/log/firewall

︿︿

星期四, 1月 31, 2008

VMWare 內的滑鼠滾輪功能

在VMWare內使用linux有的時候會發現滑鼠滾輪功能沒有作用
其解決方式為
#vi /etc/X11/xorg.conf
找到滑鼠 protocol那段
Option “Protocol” “ps/2”   
改成   
Option “Protocol” “imps/2"

重新啟動 X就可以使用滑鼠滾輪功能^^

星期二, 1月 29, 2008

Openwebmail 2.52 in Fedora 7

參考
http://b2d.phc.edu.tw/modules/tadbook2/view.php?book_sn=21&bdsn=690

1.先設定 sendmail and dovecot 還有安裝httpd

2.下載 rpm
http://www.openwebmail.org/openwebmail/download/redhat/rpm/release/openwebmail-2.52-1.i386.rpm

3.檢查相關套件是否有安裝
perl-suidperl
perl-Compress-Zlib
perl-Text-Iconv

4.安裝 Openwebmail
#rpm -ivh openwebmail-2.52-1.i386.rpm
此時會被告知
You may login with non-root account from
http://localhost.localdomain/cgi-bin/openwebmail/openwebmail.pl


5.但是實際去登入
http://localhost.localdomain/cgi-bin/openwebmail/openwebmail.pl
的時候會出現
Please execute '/var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init' on server first!

6. 所以去執行
#/var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init
但是又會被告知
Please change '/var/www/cgi-bin/openwebmail/etc/dbm.conf' from

dbm_ext .db
dbmopen_ext none
dbmopen_haslock no

to

dbm_ext .db
dbmopen_ext .db
dbmopen_haslock no

And execute '/var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init' again!

7.修改相關檔案 請注意位置的部份
#vi /var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf
dbm_ext .db
dbmopen_ext none
dbmopen_haslock no

修改為

dbm_ext .db
dbmopen_ext .db
dbmopen_haslock no

8.再次執行初始化
#/var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init

設定完成

星期一, 1月 14, 2008

Master / Slave DNS 小Memo

之前在實作Master 還有Slave DNS的時候
沒有把 Master 更新 Resource Record 的細節寫上來
在這邊做一下Memo

條件
1.在 Zone file 內有 slave DNS 的NS紀錄及A紀錄
2.Slave DNS 的zone file 有指定masters
3.該資料夾 bind 有寫入的權限

^^
找個時間補上去吧

星期四, 1月 10, 2008

Debian 的vi

Debian 內建的vi 為 vim-tiny 所以有一些常用的功能
都沒有內建在裡面
建議可以安裝 vim-tcl 來讓自己習慣
有了vim-tcl 就可以使用
syntax on
set hlsearch
那些可愛的功能了
^^