2012年2月28日 星期二

windows安裝 python setuptools easy_install

1. Download setuptools, (setuptools-0.6c11.win32-py2.7.exe)
http://pypi.python.org/pypi/setuptools

2. Add C:\Python27\Scripts in PATH variable

3. Install compiler
http://www.microsoft.com/express/Downloads/#2008-Visual-CPP

3. try using easy_install to install some stuff

2012年2月9日 星期四

讓Linux可以解析到WINS下的機器

1. 在/etc/samba/smb.conf新增

[global]
wins server = ip

2. 更改/etc/nsswitch.conf 的hosts解析方式增加wins
hosts: wins dns files


參考資料:
https://bbs.et8.net/bbs/showthread.php?t=885180

2012年2月7日 星期二

Install freeradius2 on CentOS

1. using yum install freeradius2 and freeradius2-utils (CentOS 5.X)
#yum install freeradius2 freeradius2-utils
CentOS 6.X:
package name is freeradius and freeradius-utils

2. start radiusd with debug mode
#radiusd -X
or, start radiusd service
#service radiusd start

3. add a user. add following line at the top of /etc/raddb/users

testing Cleartext-Password := "password"


4. add a accept client rule in /etc/raddb/client.conf:
client 192.168.0.0/24 {
     secret    = testing123
     shortname = private-network
}

5. restart the radiusd
#service radiusd restart

6. try the user testing is acceptable

$ radtest testing password 127.0.0.1 0 testing123

(If show Access-Accept, It success.
If show "radclient:: Failed to find IP address for XXX", That mean radclient can't resolve XXX, add a line to /etc/hosts likes "127.0.0.1 XXX" or setup DNS correctly)

7. try the user testing from remote client

$ radtest testing password 192.168.1.1 0 testing123


reference:
http://freeradius.org/doc/
http://tec1021.pixnet.net/blog/post/28639573-%E8%BC%95%E9%AC%86%E6%9E%B6%E5%A5%BDradius%E4%BC%BA%E6%9C%8D%E5%99%A8~