ลืม password ของ root!

วิธีการเปลี่ยน password ให้ทำตามนี้

4.4 Losing Your Root Password
If for some reason you lose your root password you can change it by following these steps:

1) Reboot your machine.

2) From GNOME, log out, and choose the reboot option. Or from the login screen, click ‘System’ then ‘Reboot’. From console mode, press Ctrl-Atl-Del (which in Linux reboots the system in a controlled fashion). You will see the shutdown sequence begin.

3) Allow the system to reboot to the GRUB splash screen, and then press “e”. Select the line containing “kernel”, and press “e” again. GRUB will display the line in edit mode.

4) Add “single” to the end of the line, and press return. GRUB will return you to the previous screen.

5) Press “b” to boot the system into what will now be single user mode. The system will come part of the way up, and then drop you into a root shell – the prompt will look like this: sh-2.05# _

6) Type “passwd” and press return. The system will ask you for a new password. Type in your new password, then to retype it as confirmation (it will not display on the screen). If the two entries do not match, it will ask you to try again. It will also warn you if it thinks the password is too obvious; you can ignore the warning, but if you are on a computer that either isn’t behind a firewall or is in a public area, this is not recommended.

7) Once the new password is in place, type “exit” and press return to allow the system to finish booting. Passwords should be something you can remember without writing down, but not something anyone else could figure out. Dictionary words and passwords that are all numbers are not recommended. Subtle misspellings, funny capitalizations (Linux is case sensitive), and substituting numbers or special characters for letters make good passwords. For instance, the first letters of the words in a phrase can work, too. Some good examples are:

BaceBawl
fOOdfiGHt
p@ssw3rd

With the new MD5 password security, passwords are no longer limited to eight characters as in older versions of UNIX. The limit is on your own memory, typing accuracy, and patience.
Important: Please remember to change the default root password as soon as you become acqainted with your system.

ที่มา: #151525

Popularity: 2% [?]

Postfix TLS Support

คำอธิบายจาก http://www.postfix.org/TLS_README.html

“Transport Layer Security (TLS, formerly called SSL) provides certificate-based authentication and encrypted sessions. An encrypted session protects the information that is transmitted with SMTP mail or with SASL authentication.”

ผมได้ทดลองติดตั้งแล้วก็พบว่าใช้งานได้ สำหรับคนใจร้อนให้ scroll เลื่อนลงไปด้านล่างจะพบ Getting started, quick and dirty ครับ

แต่สำหรับคนที่ใช้ CentOS มีคนเขียน tutorial เจ๋งๆ ไว้ที่ http://www.howtoforge.com/perfect_setup_centos_4.4_p5

ผมทดลองดูแล้วก็ไม่มีปัญหา แต่สำหรับคนที่ใช้ คำสั่ง fixup protocal smtp 25 ของ Cisco PIX อาจจะเศร้าหน่อยเพราะทำ TLS เสร็จแล้วอาจไม่ได้ใช้ เพราะคำสั่งนี้อยู่ญาตให้ติดต่อกับ mail server ได้เฉพาะ HELO, MAIL, RCPT, DATA, RSET, NOOP, และ QUIT คำสั่งนอกจากนี้ จะได้รับ response เป็น “500 command unrecognized” ทั้งหมด (อ้างอิง http://www.ciscopress.com/articles/article.asp?p=24685&seqNum=4&rl=1 และ http://www.mnet.state.mn.us/mail/mail-setup-tls.php)

ทดสอบว่า TLS ทำงานหรือเปล่า ให้ลองทำตามนี้ครับ
[root@localhost]# telnet localhost 25
Trying 127.0.0.1…
Connected to localhost.localdomain (127.0.0.1).
Escape character is ‘^]’.
220 localhost ESMTP Postfix
ehlo hostname.com
250-localhost
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250 8BITMIME
STARTTLS
220 Ready to start TLS

ตัวเข้มคือตัวที่พิมพ์เข้าไป ถ้าเห็น Ready to start TLS ก็ ok แล้วครับ :)

Authenticated SMTP สามารถใช้ได้ 3 port คือ 25 (SMTP), 465 (SMTPS) และ 587 (mail message submission).

Popularity: 84% [?]

วิธีการติดตั้ง Chrooted DNS Server (BIND9)

วิธีการติดตั้ง chrooted dns server สำหรับ CentOS

yum install bind-chroot 

chmod 755 /var/named/
chmod 775 /var/named/chroot/
chmod 775 /var/named/chroot/var/
chmod 775 /var/named/chroot/var/named/
chmod 775 /var/named/chroot/var/run/
chmod 777 /var/named/chroot/var/run/named/
cd /var/named/chroot/var/named/
ln -s ../../ chroot
chkconfig –levels 235 named on
/etc/init.d/named start

ที่มา: http://www.howtoforge.com/perfect_setup_centos_4.4_p4

Popularity: 80% [?]

วิธีการติดตั้ง SNMP บน CentOS 4

อ่านได้ที่นี่เลยครับ เขาเขียนไว้ค่อนข้างละเอียดครับ

Popularity: 70% [?]

Monitor A System With Sysstat (CentOS)

Sysstat เป็นโปรแกรมที่ช่วยเก็บข้อมูลเกี่ยวกับ performance ของเครื่อง และบันทึกลงข้อมูลเก็บไว้เรียกดูได้

วิธีการติดตั้ง sysstat

yum intstall sysstat

หลังจากติดตั้งแล้วจะต้องปล่อยให้ชุดโปรแกรมของ sysstat ทำการเก็บข้อมูลไประยะหนึ่งก่อนจึงจะเรียกดูข้อมูลได้ โดยในชุด rpm ของ sysstat จะมีการติดตั้ง cron เพื่อให้สั่งทำงานทุก 10 นาที อยู่ที่ /etc/cron.d/sysstat ภายในไฟล์นี้มีข้อมูลคือ

# run system activity accounting tool every 10 minutes
*/10 * * * * root /usr/lib/sa/sa1 1 1
# generate a daily summary of process accounting at 23:53
53 23 * * * root /usr/lib/sa/sa2 -A

Read more »

Popularity: 33% [?]