Monday, April 30, 2007

Best Freeware, Open source, Free resources

Best Desktop Tools and Office

  1. OpenOffice.org free productivity suite *****
  2. AbiWord Free Word processing *****
  3. PrestoNotes Desktop Notes
  4. TurboNotes - Sticky notes
  5. StyckyPad - Sticky notes
  6. Stickies - Sticky notes
  7. DBDesigner Database
  8. CutePDF Writer PDF Software
  9. GanttProject 2.0 project management
  10. AceMoney Lite Financial Management
  11. Grisbi 0.5.7 personal finance manager
  12. NeoMem Personal Information Manager
  13. Programmers Notepad 2.0.6.1 text editor with special features for coders
  14. Notepad++ Notepad Replacement
  15. Notepad2 1.0.12 text editor
  16. o3find 0.82 Full Text Search for OpenOffice.org documents.
  17. ConvertAll 0.3.1 Unit Conversion program
  18. Wikidpad 1.1.6 Wiki-like notebook
  19. TreeLine 0.14.1 Free Word processing
  20. Tinyspell Spelling Tools
  21. Wordweb Thesaurus*****
  22. TheSage Thesaurus*****
  23. ReplaceEm Text Tools
  24. PagePlus SE - Free Desktop Publishing Software
  25. Hyperwords *****
  26. Wikipedia -the best site around
  27. Google Desktop
  28. Yahoo! Desktop Search
  29. Copernic Desktop Search 1.63
  30. WriteBoard Create, edit, and share documents in your browser
  31. Groove Virtual Office Online file-sharing and collaboration tool
  32. dotWidget 1.0
  33. iColorFolder 1.4.2***** Change the color of your folders
  34. BB4Win Shell replacement
  35. A43 File Management Utility Replace explorer
  36. Brico Packs Desktop enhancement*****
  37. CursorXp Freeware****
  38. WindowsBlinds Free version****
  39. BootSkin Freeware****
  40. ThemeManager Freeware version****
  41. LogonXp****


Best Browsers - Best Email clients - Best FTP - Proxy-P2P- Best News readers
  1. Firefox *****
  2. Avant ****
  3. Maxthon*****
  4. Opera *****
  5. Mozilla Thunderbird 1.5 *****
  6. Pegasus Mail
  7. FileZilla 2.2.18 ftp
  8. SmartFTP 2.0.995.3 ftp
  9. Hmailserver 4.1.1-Build-140
  10. HTTrack Website Copier 3.40 -offline browser utility
  11. FlashGot -downloader
  12. Privoxy -web proxy*****
  13. Tor - anonymous Internet communication system*****
  14. LimeWire p2p
  15. Bittorrent p2p
  16. FolderShare (Windows) sharing
  17. FolderShare (Mac)
  18. Flickr *****
  19. Feedreader ****
  20. GreatNews Rss Reader


Best Antivirus >> Best Firewall >> Best Adware/Spyware>>Popups
  1. AVG free (antivirus)*****
  2. Avast (antivirus)****
  3. Bitdefender 8 Free Edition(antivirus)
  4. ClamWin Free AntiVirus 0.88
  5. Comodo AntiVirus
  6. AntiVir PersonalEdition
  7. ZoneAlarm free (firewall)*****
  8. Comodo Personal Firewall
  9. Kerio (firewall)
  10. Sygate (firewall)
  11. Outpost Firewall (firewall)
  12. GRC Shields Up
  13. AirDefense Personal Lite
  14. All-in-One Secretmaker
  15. Comodo AntiSpam
  16. Lavasoft Ad-aware *****
  17. Spybot *****
  18. Windows defender ****
  19. SpywareBlaster****
  20. Trend Micro HouseCall
  21. HijackThis 1.99.1

Best Online Antivirus scanners
  1. BitDefender Free Online Virus Scan (requires ActiveX)
  2. Computer Associates eTrust Antivirus Web Scanner
  3. Freedom Online Virus Check
  4. F-Secure Online Virus Scanner
  5. Kaspersky Online Scanner (scanner requires ActiveX)
  6. McAfee FreeScan
  7. Panda ActiveScan
  8. RAV Antivirus (scans a file)
  9. Symantec security and virus checks (scanner requires ActiveX)
  10. Trend Micro HouseCall (requires use of a setup program for Netscape browsers)
  11. Virus Total (scans a file)
  12. Pc Pitstop *****

Best Web based mail
  1. Gmail ****
  2. Yahoo Mail *****
  3. MSN Hotmail ***
  4. AIM Mail ****
  5. Inbox Mail *****
  6. MyWay Mail**
  7. Fastmail***
  8. 30gigs**
  9. HushMail
  10. Walla Mail
  11. Goowy Mail

Best Burning Software
  1. CDBurnerXP Pro
  2. Deep Burner
  3. BurnAtOnce
  4. ImgBurn
  5. DVD Shrink
  6. LC ISO Creator

Best Graphics
  1. GIMP 2.2.10*****
  2. Paint.NET 2.6*****
  3. Blender 2.41 *****
  4. Inkscape 0.43 *****
  5. PhotoFiltre *****
  6. PhotoPlus 6****
  7. DrawPlus 4 - Free Graphic Design and Vector Drawing Software
  8. 3DPlus 2 - Free 3D Animation and modeling Software
  9. IrfanView
  10. PhotoVista Panorama
  11. Tux Typing 2 1.5.3
  12. Fast Stone Capture - image capture
  13. Fast Stone Photo Resizer

Best Html Editors - Best CSS Editors - Best PHP
  1. Nvu 1.0 *****
  2. HTML-Kit*****
  3. Cascade DTP
  4. Dev-PHP IDE
  5. DHE Editor
  6. WebPlus 6 - Free Web Site Design & Publishing Software
  7. Alleycode
  8. TopStyle Lite 3.10****
  9. 1stPage HTML Editor
  10. PhpDesigner 2006

Best Blog desktop publishers
  1. Qumana
  2. Windows Live Writer
  3. BlogDesk

Best Sound - Best Video- Best Music Organizers
  1. Audacity 1.2.4b Free sound editor *****
  2. Gungirl Sequencer 0.3.1 Sequencer
  3. Hydrogen 0.9.4-svn Advanced Drum Machine
  4. wxMusik 0.4.2.2 An open-source, cross-platform multimedia player and library.
  5. VirtualDub 1.6.14 VirtualDub is a video capture/processing utility
  6. MusikCube 1.0RC2 Music “library” application similar to iTunes
  7. CoolPlayer build 215 Audio Player similar to Winamp
  8. Media Player Classic 6.4.9.0 Media Player Classic is an all-in-one video player
  9. Foobar2000 Media player
  10. Audiograbber Rip music from cd
  11. iTunes Player/Organizer
  12. Yahoo! Music Jukebox
  13. Kristal Audio Engine
  14. Pandora Listen music online
  15. Audiri Listen music online

Best Calendars - Best Organizers
  1. Chaos Manager Organizers
  2. Google Picasa Photo organizer
  3. Fast Stone Image Viewer ( browser,converter,editor)
  4. Rainlendar 0.22.1 Calendar
  5. Yahoo Calendar
  6. Chandler calendar
  7. Yahoo Widgets
  8. Ta-Da List
  9. Del.icio.us bookmarking
  10. SyncNotes
  11. FreeMind -mapping
  12. Furl bookmarking
  13. XnView organizer

Best IM and Telephony
  1. Trillian Basic
  2. Skype
  3. QNext
  4. Google Talk
  5. Gaim
  6. Miranda IM
  7. Yahoo! Messenger
  8. MSN Messenger

Best Blogging tools
  1. WordPress*****
  2. Blogger ****
  3. LiveJournal
  4. Xanga Classic
  5. Blogsome
  6. Typolis

Best System Tools
  1. PC Inspector File Recovery
  2. Advanced Windows Care (repair and fix windows)
  3. RegToy - tweak and manage xp
  4. TuneXP - system tuneup*****(all in one speedup)
  5. TweakUI -tweaking
  6. WinDirStat 1.1.2 disk usage statistics
  7. Virtual Magnifying Glass v2.36 screen magnification
  8. TaskSwitchXP 2.09
  9. 7-Zip 4.32 file archiver *****
  10. Izarc file archiver
  11. ZipGenious file archiver
  12. TUGZip file archiver
  13. TrueCrypt 4.1 encryption
  14. AxCrypt 1.6.2.3 encryption
  15. Cryptainer LE disk encryption
  16. KeePass 1.04 password storage
  17. Startup Control Panel -startup
  18. Freecommander 2004 -file manager
  19. Cacheman- memory management
  20. Process Explorer -system monitoring
  21. Registry Commander -reg. editor
  22. Erunt -reg tools
  23. TweakNow RegCleaner Standard
  24. RegClean
  25. Regseeker -reg cleaner****
  26. Regcleaner reg cleaner ****
  27. NTREGOPT -registry optimization
  28. Eraser -secure deletion
  29. X-Setup -last free version
  30. Daemon Tools CD disk image virtual drive
  31. CCleaner 1.27.260 - Crap Cleaner *****- reg cleaner, disk cleaner ,uninstaller
  32. Advanced Disk Cleaner disk cleaner
  33. WinDriversBackup - driver backup
  34. Driver Cleaner
  35. Starter-startup
  36. Autoruns-startup
  37. FullSync 0.9.1 file synchronization and backup
  38. Comodo BackUp
  39. SyncBack - backup
  40. Replicator v3.3.4 backup
  41. Diskeeper Lite 9 & NTI Backup Now
  42. PageDefrag - defragmentation tool
  43. GMail Drive 1.0.9
  44. Free Download Manager
  45. HDClone Freee Edition -move content from your hard drive
  46. CPU-Z system information
  47. Unlocker
  48. SendToAny SendTo menu enhancement
  49. Undelete recover lost files
  50. Unknown Devices - Hardware identifier
  51. XP Syspad Windows system utility

Best Content Management System - Web Tools
  1. Joomla (cms)
  2. XOOPS (cms)
  3. Php Wiki
  4. Blog CMS
  5. MODx (cms)
  6. Drupal (cms)
  7. JetBox (cms)
  8. Simple Machines Forum
  9. Php Shop
  10. osCommerce (shop e-commerce)
Just for Referrence,thanks Carol,copy from www.carolsvault.com

Beryl

vista very cool,but it's windows,do u know is there any cool desktop tools for linux?
Definitely yes----Beryl

i recommend Ubuntu

Tuesday, April 24, 2007

Linux Distro Timeline

Slax Bootable USB Drive----ZT by welv

Installing Slax in the pen drive

Now you choose between two options. You can mount the downloaded ISO image of Slax and follow a few steps, or you can burn the ISO image file to a CD-ROM and use the Slax Installer application. I suggest the first approach, because are some little things you must do to get Slax in the pen drive ready. To do so, create a directory -- say /slaxUSB -- on which to mount the ISO image file of Slax, then mount the ISO image:

mount -o loop slax-killbill-5.0.5.iso /slaxUSB/

Now, as root, mount the formated USB device:

mount -t vfat /dev/sda /mnt/sda/

Note that /mnt/sda/ can be any directory you want to use. Copy the entire contents of the directory mounted with the ISO image to the place where you have mounted the pen drive:

cp -ra /slaxUSB/* /mnt/sda/

The -r argument specifies a recursive copy including every directory, and the -a preserves as much as possible the structure of the data in the USB.

Now you need to copy some files in the folder /boot/ of the mounted pen drive to the root of the pen drive so you can boot from it:

cd /mnt/sda/boot/
cp vmlinuz /mnt/sda/
cp initrd.gz /mnt/sda/

Move to the directory where the memory stick is mounted -- in this case /mnt/sda/ -- and change the name of the file isolinux.cfg to syslinux.cfg. Edit the just-renamed syslinux.cfg and delete /boot/ or boot/ from the lines that contain vmlinuz and initrd.gz -- for example, /boot/vmlinuz and /boot/initrd.gz. This changes the location of the files vmlinuz and initrd.gz, making them visible to the bootloader at the time of boot.

Finally, use whereis to check whether you have Syslinux installed. If not, download and extract it to a directory, then run:

syslinux -s /dev/sda

Where /dev/sda is the location of your recent modified Slax with all the files.

Now, reboot your computer, enter the BIOS, and change the boot order. Set USB-ZIP as the first one, then the hard drive, and so on. If your machine is old it's possible that it won't let you boot from USB, in which case you can use a boot diskette or CD, or use Slax as a live CD."

Friday, April 20, 2007

FreeRadius configure with CSPS----Writen by welv

1)Firstly,config your CSPS Authentication using Radius and Scheme using HTTP_Digest, then fill in your primary radius server's ip address and port,such as 10.74.51.42 and port is 1812(authentication default),next is Accounting,turn on and fill in primary server's address too.

2)Secondly,edit
radiusd.conf,uncomment digest in Authenticate{},such as:

authenticate {
Auth-Type PAP {
pap
}
Auth-Type CHAP {
chap
}
Auth-Type MS-CHAP {
mschap
}
# If you have a Cisco SIP server authenticating against
# FreeRADIUS, uncomment the following line, and the 'digest'
# line in the 'authorize' section.
digest
......
}

you can see the reason why we need did like this from the comments

3)edit
users file in the same directory:

DEFAULT Auth-Type := digest
Fall-Through = 1
......

4)insert some account data in mysql database,table
radcheck:

Full Texts id UserName Attribute op Value
Edit Delete 1 pank User-Password == 1111
Edit Delete 2 vincent User-Password == 2222
Edit Delete 3 520601 Password == 520601
Edit Delete 4 512352 Password == 512352
Edit Delete 5 2471 Password == 2471
Edit Delete 6 512332 User-Password == 512332


5)insert some attributes in radgroupreply like this:

Full Texts id GroupName Attribute op Value
Edit Delete 1 user Service-Type == Framed-User
Edit Delete 2 user Framed-Protocol == PPP
Edit Delete 3 user Framed-Compression == Van-Jacobsen-TCP-IP

6)Now you can using your phone register to proxy 10.74.52.42,then it will proxy these register message to radius server 10.74.51.42 for authentication

Monday, April 16, 2007

PPPoE Server + FreeRADIUS + MySQL

準備檔案
wget ftp://ftp.samba.org/pub/ppp/ppp-2.4.4.tar.gz
wget http://www.roaringpenguin.com/penguin/pppoe/rp-pppoe-3.8.tar.gz
wget ftp://ftp.freeradius.org/pub/radius/freeradius-1.1.3.tar.bz2

以下設定
MySQL Server 用 mysql_server 代稱
RADIUS Server 用 radius_server 代稱
實作時請換成您的 Server IP 或 Hostname
MySQL 部分
tar jxf freeradius-1.1.3.tar.bz2
mysqladmin -u root -p create radius
mysq -u root -p radius < freeradius-1.1.3/./doc/examples/mysql.sql
mysql -u root -p radius
先加入一些資料
insert into radgroupreply (groupname,attribute,op,value) values ('user','Auth-Type',':=','Local');
insert into radgroupreply (groupname,attribute,op,value) values ('user','Service-Type','=','Framed-User');
insert into radgroupreply (groupname,attribute,op,value) values ('user','Framed-IP-Netmask','=','255.255.255.255');
insert into radgroupcheck (groupname, attribute, op, value) values ("user", "Auth-Type", ":=", "Local");
加入使用者
insert into radcheck (username,attribute,op,value) values ('pank','User-Password','==','1111');

FreeRADIUS 部分
tar jxf freeradius-1.1.3.tar.bz2
cd freeradius-1.1.3
./configure && make install
cd /usr/local/etc/raddb
編輯 clients.conf, secret 是 Client 端連 FreeRADIUS 所需的密碼(shared secret)

client 127.0.0.1 {
secret = 1234
shortname = localhost
}

client 192.168.0.0/16 {
secret = 1234
shortname = lan
}


編輯 radius.conf, 開啟 sql 並 mark 掉不需要的部分

authorize {
preprocess
chap
mschap
suffix
sql
...
}

accounting {
...
sql
...
}


編輯 sql.conf

...
server = "mysql_server"
login = "mysql_username"
password = "mysql_password"
radius_db = "radius"


測試能否正常運作
radiusd -X
radtest pank 1111 mysql_server 0 1234
若有看到 Access-Accept 就 OK

PPPoE Server 部分
tar zxf ppp-2.4.4.tar.gz
tar zxf rp-pppoe-3.8.tar.gz
cd ppp-2.4.4
./configure && make install
cd ../rp-pppoe-3.8/src
./configure --enable-plugin=../../ppp-2.4.4
--enable-plugin 是必要參數, 才能使用 -k (kernel-mode PPPoE)
make install
cp ppp-2.4.4/pppd/plugins/radius/radius.so /etc/ppp/plugins
cp ppp-2.4.4/pppd/plugins/radius/etc/* /etc/ppp/radius
編輯 /etc/ppp/options

lock
crtscts
nobsdcomp
nodeflate
nopcomp
plugin /etc/ppp/plugins/radius.so
radius-config-file /etc/ppp/radius/radiusclient.conf


編輯 /etc/ppp/radius/radiusclient.conf

auth_order radius
login_tries 4
login_timeout 60
nologin /etc/nologin
issue /etc/ppp/radius/issue
authserver radius_server:1812
acctserver radius_server:1813
servers /etc/ppp/radius/servers
dictionary /etc/ppp/radius/dictionary
login_radius /usr/local/sbin/login.radius
seqfile /var/run/radius.seq
mapfile /etc/ppp/radius/port-id-map
default_realm
radius_timeout 10
radius_retries 3


編輯 /etc/ppp/radius/servers

radius_server 1111


pppoe-server -k -I eth0 -L 192.168.1.10 -R 10.0.0.1 -N 64
啟動 PPPoE Server (kernel-mode), Server Local IP 是 192.168.1.10, Client 端的起始 IP 10.0.0.1, 最多同時 64 個 Clients 同時連線.

Tuesday, April 10, 2007

Google搜索技巧----ZT by welv

Google搜索技巧
作者:Philipp Lenssen

原文地址:http://blog.outer-court.com/archive/2005-09-29-n85.html

原文标题:Google Search Tips 2005

注意:本文翻译人不详。文中[]符号是为了突出关键词,在实际搜索中是不包含的;本文采用的是意译;本译文已经征得作者许可;本译文可任意转载,请保留本文的头信息。

Google搜索技巧2005

这里有一些Google搜索引擎的基本搜索技巧以及高级技巧,你可能对其中大部分已经了解,但是如果你知道了另外的那一部分,它可能会给你将来的搜索过程带来很大的便利。

1. 双引号可以用减号代替,比如搜索["like this"]与搜索[like-this]是一个效果

2. Google不会处理一些特殊的字符,比如[#](几年前还不行,现在可以了,比如搜索[c#]已经可以搜到相应的结果),但是还有一些字符它不认识,比如搜索[t.]、[t-]与[t^]的结果是一样的

3. Google允许一次搜索最多32个关键词

4. 在单词前加~符号可以搜索同义词,比如你想搜索[house],同时也想找[home],你就可以搜索[~house]

5. 如果想得到Google索引页面的总数,可以搜索[* *]

6. Google可以指定数字范围搜索。搜索[2001..2005]相当于搜索含有2001、2002直到2005的任意一个数的网页

7. 搜索[define:css]相当于搜索css的定义,这招对想学习知识的人很有效;也可以用[what is css]搜索;对中文来说,也可以用[什么是css]之类的

8. Google有一定的人工智能,可以识别一些简单的短语如[when was Einstein born?]或[einstein birthday]

9. 通过[link:]语法,可以寻找含有某个链接的网页,比如[link:blog.outer-court.com]将找到包括指向 blog.outer-court.com超级链接的网页(最新的Google Blog Search也支持这个语法),但是Google并不会给出所有的包含此链接的网页,因为它要保证pagerank算法不被反向工程(呵呵,可以参见那两个Google创始人关于pagerank的论文,可下载)

10. 如果在搜索的关键词的最后输入[why?],就会在结果中出现链接到Google Answers的链接http://answers.google.com ,在里面可以进行有偿提问

11. 现在出现了一种兴趣活动,叫做Google Hacking,其内容是使用Google搜索一些特定的关键词,以便找到有漏洞的、易被黑客攻击的站点。这个网站列出了这些关键词:Google Hacking Database( http://johnny.ihackstuff.com/index....ule=prodreviews )

12. 在Google 中输入一组关键词时,默认是“与”搜索,就是搜索包含有所有关键词的网页。如果要“或”搜索,可以使用大写的[OR]或 [|],使用时要与关键词之间留有空格。比如搜索关键词[Hamlet (pizza | coke)],是让Google搜索页面中或页面链接描述中含有Hamlet,并含有pizza与coke两个关键词中任意一个的网页。

13. 并非所有的Google服务都支持相同的语法,比如在Google Group中支持 [insubject:test]之类的主题搜索。可以通过高级搜索来摸索这些关键词的用法:进入高级搜索之后设置搜索选项,然后观察关键字输入窗口中的关键字的变化

14. 有时候Google懂得一些自然语言,比如搜索关键词[goog], [weather new york, ny], [new york ny]或[war of the worlds],此时Google会在搜索结果前显示出一个被业内称为“onebox”的结果,试试看吧!

15. 并非所有的Google都是相同的,它因国家版本(或是说语言版本)而异。在US版下,搜索[site:stormfront.org]会有成千上万的结果,而在德语版下,搜索[site:stormfront.org]的结果,嗯,自己看吧。Google的确与各国政府有内容审查协议,比如德国版,法国版(网页搜索),中国版Google新闻

16. 有时候Google会提示你搜索结果很烂,比如你搜索关键词[jew]试试,Google会告诉你它给出的搜索结果很烂,然后给你一个解释:http://www.google.com/explanation.html

17. 以前,搜索某些关键词如[work at Google] 时会看到Google给自己打的广告。可以去http://www.google.com/jobs/了解Google的工作

18. 对于一些“Googlebombed”(大概意思是指Google搜索的结果出问题了)的关键词,会有一个广告链接到:http: //googleblog.blogspot.com/2005/09/googlebombing-failure.html (中国大陆需要代理才能访问)。比如搜索[failure],第一条是美国布什总统介绍

19. 虽然现在Google还没有支持自然语言,但这里有一段录像显示了支持自然语言的搜索引擎的使用效果:http://blog.outer-court.com/videos/googlebrain.wmv

20. 有人说在Google中搜索[president of the internet],其结第一条表明了president of the internet是谁,我也是这么认为的,而且你还可以使用这个logo支持本文作者:http://blog.outer- court.com/files/president.gif

21. Google现在不再有“stop words”(被强制忽略的关键词),比如搜索 [to be or not to be], Google返回的结果中间还列有相关的完整短语搜索结果

22. 在Google 计算器(http://www.google.com/help/features.html#calculator )中有个彩蛋:输入[what is the answer to life, the universe and everything?]时,会返回42。(关键词翻译过来的意思是指“生命、宇宙和一切的答案”,这是一个著名科幻小说中的情节,详情参见http: //en.wikipedia.org/wiki/The_Answer_to_Life,_the_Universe, _and_Everything)。试试吧,哈哈

23. 你可以在搜索时使用通配符[*],这在搜索诗词时特别有效。比如你可以搜一下["love you twice as much * oh love * *"] 试试

24. 同样,你的关键词可以全部都是通配符,比如搜索["* * * * * * *"]

25. www.googl.com是在输错网址后的结果,也是个搜索网站,但搜索结果与Google完全不同。而且此网站也赚Google的钱,因为它使用Google AdSense

26. 如果你想把搜索结果限制在大学的网站之中,可以使用[site:.edu]关键词,比如[c-tutorial site:.edu],这样可以只搜索以edu结尾的网站。你也可以使用Google Scholar来达到这个目的。也可以使用[site:.de]或[site:.it]来搜索某个特定国家的网站。

关于LDAP的补充----ZT by welv

LDAP就是 light DAP, 轻量级目录访问协议, 可以想象 还有一个DAP,
70年代诞生的DAP协议基于 X.400目录访问协议。主要用于 大型主机,因为有大量不常用的功能而且这些不用的功能消耗了过多的系统资源,虽然极强大,但是应用不广, 所以出现了LDAP.

这是一个开放的协议, 具体的实现有 Netscape LDAP, Novell NDS, MS AD等等,这3个是使用最广,影响最大的。
Netscape LDAP server主要使用在unix或类unix系统上, MS AD自然只能在windows上, NDS是唯一一个跨平台的产品。注意: LDAP本身是平台无关的。

工作原因,比较熟悉NDS, AD最熟。我个人最喜欢NDS,AD当然最简单,但是最不稳定,最乱,而且比较耗资源。

楼主说的类似数据库,完全正确,因为它原本就是数据库,只是不是关系型的数据库,它是链式数据库,详细细节可以找本数据库原理,很详细的。

和关系数据库一样, LDAP内能够定义哪些对象,每个对象可以有什么属性,每个属性可以取什么样的值,这样一个框架结构被称为Schema,它是类,对象,属性的集合。类又分为抽象类(只能做父类,不能实例化)和结构类(可以实例化),编程的朋友会发现和面向对象的编程的概念完全一样。

举例: LDAP内必须先有user类, 然后用user类创建user对象(一般缺省有的),我们才能创建具体的用户账号(实例化), schema中user对象被指定了有哪些属性,我们创建账号的时候才能给账号哪些属性,例如 schema中user对象没有别名属性,我们就不能给账号起别名。

Schema的扩展:
缺省的schema一般预先创建有足够的类,对象和属性,例如 MS 的AD 缺省有 170个类和833个对象和属性。但是如果不能满足需要的话,我们就可以扩展Schema, 一般是使用 LDAP API, 例如 MS的 ADSI, NDS有专门的工具,当然也可以直接使用LDAP查询语言,来直接操作整个LDAP目录树。(当然要有权限,很危险哦,后果自负,呵呵),找本书看吧,很简单,和SQL语言其实很类似,易学难精。呵呵。

理解与应用LDAP服务器----ZT by welv


(前段时间一直在做LDAP+POSTFIX相关项目,先把关于LDAP的一些经验写出来,一来可能会帮助一些人,二来对我自己所学知识也是一个巩固。)

先声明:我写的只是我对LDAP的一些理解,如果我的理解错误,那就是对兄弟们的误导。所以你可以直接看文章的结尾提供的几个网址。

关于LDAP的概念随便网上有很多,我不想重复,这里只是说一下我自己的理解。
都说它是“轻量级目录协议”,太专业,我不懂,我只把它想象成“简单”的目录协议。

几个很重要的概念,以后会用到:
---------------------------------------------
dn :一条记录的位置
dc :一条记录所属区域
ou :一条记录所属组织
cn/uid:一条记录的名字/ID
---------------------------------------------

实际上更多时候我只把它看成数据库。我把它和我非常熟悉的MYSQL数据库做比较,通常会得到更好的理解:

MYSQL用“表”储存数据,LDAP用“树”
MYSQL指定一条记录要3个条件:DB、TABLE、ROW。
LDAP却更自由,为什么呢?因为LDAP数据是“树”状的,而且这棵树是可以无限延伸的,假设你要树上的一个苹果(一条记录),你怎么告诉园丁它的位置呢?当然首先要说明是哪一棵树(dc,相当于MYSQL的DB),然后是从树根到那个苹果所经过的所有“分叉”(ou,呵呵MYSQL里面好象没有这 DD),最后就是这个苹果的名字(uid,记得我们设计MYSQL或其它数据库表时,通常为了方便管理而加上一个‘id’字段吗?)。好了!这时我们可以清晰的指明这个苹果的位置了,就是那棵“歪脖树”的东边那个分叉上的靠西边那个分叉的再靠北边的分叉上的半红半绿的……,晕了!你直接爬上去吧!我还是说说LDAP里要怎么定义一个字段的位置吧,树(dc=waibo,dc=com),分叉(ou=bei,ou=xi,ou= dong),苹果(cn=honglv),好了!位置出来了:
dn:cn=honglv,ou=bei,ou=xi,ou=dong,dc=waibo,dc=com

一个有名的画家说过:“世上没有相同的2个鸡蛋”。当然也没有相同的2个苹果……,同样,在LDAP里也不可能存在2个相同的dn。


LDAP数据填充原理:
一棵树的生长,要循序渐进,如果还没有长出某个分叉,就不可能在那个分叉里长出苹果(问:FT!苹果是长在分叉上的吗?答:为了便于理解,你就当它是吧),同样,LDAP数据库也要一步步的充实,举一个学校数据库的例子,我们将要把一个庞大的学生档案放到LDAP里,大致需要这么做:
---------------------------------------------
1、建立“树根”,这是通过修改“slapd.conf”来实现的,由于现在的目的是理解,所以具体步骤就不说了,反正就是在这一步建立了一个“dc= ourschool,dc=org”这样一个“树根”。注意:我把它理解成“目录”,或者“容器”,甚至它本身也是文件(苹果)的特殊形式,熟悉LINUX文件系统的朋友会更容易理解。
2、建立18个系,分别是“dn:ou=computer,dc=ourschool,dc=org”、“dn:ou=film,dc=ourschool,dc=org”……
3、当然是在每个系里面建立专业,比如“dn:ou=linux,ou=computer,dc=ourschool,dc=org”……
4、(开始长苹果吧!)加学生喽——“dn:cn=stan,ou=linux,ou=computer,dc=ourschool,dc=org”……
5、已经完成了吗?对了!学生的详细信息还没有呐!不过先这样吧,反正记录是可以编辑的。
---------------------------------------------


LDAP记录的详细信息
dn:cn=stan,ou=linux,ou=computer,dc=ourschool,dc=org
objectClass:organizationalPerson
cn:stan
cn:小刀
sn:小刀
description:a good boy
(以上是一条记录的信息,如果把他保存成LDIF文件,可以导入到LDAP数据库中)
上面不是说没有学生详细信息吗?怕你着急,就马上写出来了,只是还没有导入到LDAP里,那是以后的事。这里我先就你可能会产生的疑问做回答。
---------------------------------------------
Q1:“cn”不是在“dn”里定义了吗,怎么又在后面重新定义了? 答:你要把“cn=stan,ou=linux,ou=computer,dc=ourschool,dc=org”看成是一个整体,它只是属性dn的值。
Q2:怎么后面有2个“cn”,我以哪个为准? 答:区别于普通数据库,LDAP每个属性一般可以具有多个值,这样不好吗?你在学校数据库里找我的时候,只要记得我的一个cn就可以了,用“cn=stan”或“cn=小刀”都可以找到我!
Q3:就这些属性了吗?我都不知道你是男是女。 答:先声明,偶是男地。 LDAP对记录的属性做了严格的限制(这一点我不太喜欢),也就是说,你可以用哪些属性,哪些属性不能为空,哪些属性最多只能有一个值等,他们都给你规定好了。幸好你有选择的权利,比如这次我们是储存学生信息,那么我们就定义一个“objectClass:organizationalPerson”,这样 “organizationalPerson”这个类所规定的所有属性我们都可以用了,而且确实很适合我们。虽然这个类中没有“sex”这个属性,不过你完全可以用一个“空闲”的属性来顶替。如果我们能自己建立“类”就更好了,但目前我还没有时间去研究这个东西,我也期望高手指点啊 :)
---------------------------------------------


好了!看到我贴的图了吗?那是我偷别人的,差不多能用我就不自己画了 :)

##############################################################

关于安装配置LDAP,使之储存系统用户,这里有一个非常好的网址,如果你的英文不是很差,都应该做的来,我偷个懒,就先不写这方面的东西喽:
http://www.mandrakesecure.net/en/docs/ldap-auth.php
上面的方法我已经试过,是可行的,如果兄弟们配置的时候出现问题我们可以讨论讨论。

关于LDAP+POSTFIX,POSTFIX里的“LDAP_README”中介绍的很详细,我再说就是重复了。
##############################################################
其它相关资源:
yala (很实用的数据库操作工具,简单的说,他就是MYSQL的phpmyadmin,自己找下载地址吧~)
http://www.openldap.org/ (说实话,我一直没用上它,不过它是官方网站,不提也不好)
http://ldap.akbkhome.com/ (什么‘类’下面有什么‘属性’,在这里找)