nscd(ネームサービスキャッシュデーモン) 初めて知った。


青唐辛子漬



※写真と本文は関係ありません。


LDAP でユーザ情報を共有している Samba サーバで最初のアクセスがすごく遅いサーバがあって、物理的に LDAP サーバと離れた HUB に繋がってるのを近くしたりして少し改善したりしてたんですが…。

最近さらに調子が悪くなって。LDAP のスレーブを作らないとダメかなと思ってたり。。

してた件が。一気に解決!!

何気なく LDAP を調べたら nscd デーモンというのがあるらしい。デフォルト設定で動かしてみたら、大丈夫!!やたー。

他にも何台かサーバがあるので調子が良かったら他でも動かそう。(nscd 自体が調子が悪くなったりするらしいが…。)


※しかし Samba の LDAP 設定とセットにしてもいい情報だと思うんだけど…。初耳でした。

vsftpd のchroot 設定。

vsftpd.conf の『 chroot_list_enable 』と『 chroot_local_user 』、『 chroot_list_file 』の 3 つのパラメータ。


『 chroot_list_enable = YES 』とすると、すべてのユーザが上層ディレクトリにアクセスできる。上層ディレクトリにアクセスできないユーザを 『 chroot_list_file=/etc/vsftpd/chroot_list 』に記載する。

さらに『 chroot_local_user = YES 』にすると、『 chroot_list_file 』の意味を逆にできる。すべてのユーザが上層ディレクトリにアクセスできない。上層ディレクトリにアクセスできるユーザを 『 chroot_list_file=/etc/vsftpd/chroot_list 』に記載する。


man page より。


chroot_list_enable 
YES に設定した場合、ログイン後にホームディレクトリへと chroot() されるローカルユーザのリストを指定できる。 chroot_local_user を YES に設定した場合には、意味が異なってくる。 リストはその場合、chroot() jail へと移動されないユーザ のリストとなる。 デフォルトでは、このリストは /etc/vsftpd.chroot_list ファイルであるが、 chroot_list_file 設定によってこれを変更することができる。 
デフォルト: NO
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list



chroot_local_user 
YES に設定した場合、ローカルユーザは(デフォルトで)ログイン後に ホームディレクトリへと chroot() される。 警告: このオプションはセキュリティに密接に関連する。 ユーザがアップロード権限を持っていたり、シェルでのアクセスができる場合は 特にである。 何をしているかを理解している場合にのみ有効にすること。 これらのセキュリティの問題は vsftpd に特有の問題ではないことに 注意してほしい。 ローカルユーザを chroot() jail に入れることができるすべての FTP デーモンにおいて、この問題がある。
デフォルト: NO


vsftpd を xinetd 経由で動かす。


vi /etc/vsftpd/vsftpd.conf


listen=YES が有効になってるので、コメントアウト。


# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
# Start wuth xinetd
#listen=YES



/etc/init.d/vsftpd stop



# vi /etc/xinetd.d/vsftpd
service ftp
{
  disable = no
  socket_type = stream
  wait = no
  user = root
  server = /usr/sbin/vsftpd
  server_args = /etc/vsftpd/vsftpd.conf
  log_on_success += DURATION USERID
  log_on_failure += USERID
  nice = 10
}



/etc/init.d/xinetd restart


sshd を xinetd 経由で動かす。

今更だけど。


# whereis sshd
/usr/sbin/sshd 



# vi /etc/xinetd.d/sshd
service ssh
{
        disable         = no
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/sbin/sshd
        server_args     = -i
        log_on_success  += DURATION USERID
        log_on_failure  += USERID
        nice            = 10
}


今操作してる ssh 接続を切断せずに。


/etc/init.d/sshd stop
/etc/init.d/xinetd restart
chkconfig sshd off


sshd を止めてから xinetd を再起動。
別の端末で接続を確認できればOK。

Redhat ES5 を yum で Update したら NIC が認識しなくなった。

# yum update して。再起動したら SSH 接続ができなくなった。orz

コンソールから確認したら NIC が認識されていない。。

Intel の e1000 だしドライバがないわけないんだけどなぁ。。

と、調査開始。新しいカーネルだと『eth0 does not seem to be present. delaying initialization.』と出てドライバを認識していない様子。

modprobe.conf には e1000 の記述。してあるし。/usr/src/kernel 以下にもドライバはあるんだけどなぁ。

e1000 の隣に e1000e ってのがあったのが気になったところ。

まあいいぁと、古いカーネルでは動くんだしとあきらめかけたんだけど

何が違うんだろうかと『kuduzu -p』コマンドの diff をとってみたら。あったったたった。


# diff -Nur old_kernel_kuduzu new_kernel_kuduzu
--- old_kernel_kuduzu   2009-02-02 11:08:19.000000000 +0900
+++ new_kernel_kuduzu   2009-02-02 10:44:47.000000000 +0900
・・・・・・・・・・・・
・・・・・・・・・・・・
@@ -490,15 +492,14 @@
 pcidom:    0
 pcibus:  4
 pcidev:  0
-pcifn:  0
+pcifn:  1
 -
-driver: e1000
+driver: e1000e
 desc: "Intel Corporation 80003ES2LAN Gigabit Ethernet Controller (Copper)"
-network.hwaddr: 00:1f:d0:ae:0d:4a
 vendorId: 8086
 deviceId: 1096
 subVendorId: 1458
@@ -490,15 +492,14 @@
 pcidom:    0
 pcibus:  4
 pcidev:  0
-pcifn:  0
+pcifn:  1
 -
 class: NETWORK
 bus: PCI
 detached: 0
 device: eth1
-driver: e1000
+driver: e1000e
 desc: "Intel Corporation 80003ES2LAN Gigabit Ethernet Controller (Copper)"
-network.hwaddr: 00:1f:d0:ae:0d:4b
 vendorId: 8086


新しいカーネルは e1000e というドライバを使うらしい。

modprobe.conf をe1000e に書き換えたら無事起動できましたとさ!!

やったね!!


旧カーネル:2.6.18-53.el5PAE
新カーネル:2.6.18-128.el5PAE

mysql_secure_installation

mysql_secure_installation ってコマンドを初めて知った。

root の パスワード設定したり、root ネットワークアクセスを禁止したり、test データベース削除したりできる。


[nininini@wwwdb mysql]$ mysql_secure_installation 
 
 
 
 
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
 
 
In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
 
Enter current password for root (enter for none): 
OK, successfully used password, moving on...
 
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
 
You already have a root password set, so you can safely answer 'n'.
 
Change the root password? [Y/n] n
 ... skipping.
 
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.
 
Remove anonymous users? [Y/n] y
 ... Success!
 
Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.
 
Disallow root login remotely? [Y/n] y
 ... Success!
 
By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.
 
Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!
 
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
 
Reload privilege tables now? [Y/n] y
 ... Success!
 
Cleaning up...
 
 
 
All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.
 
Thanks for using MySQL!
 
 


Trac の Webadmin がプラグインなしで使えるようになった。

Trac の 0.11 からプラグインじゃなくて Core Package に含まれたそうな。


オンラインドキュメントに詳しく載ってる。

Web Admin Plugin

Note: the plugin is no longer necessary starting with version 0.11 of Trac, as it has been integrated into the core package. However don’t forget to give permissions to your user. This is accomplished on the command-line (the last command shows what your permissions are):

trac-admin /path/to/my/project
permission add username-from-htpasswd TRAC_ADMIN
permission list username-from-htpasswd

The rest of this page is not of interest for anyone using 0.11.x. Just refresh your page and you will see a tab in the right upper side of the page.

trac.ini への設定記載も不要でした。


何でダメだったかというと、TRAC_ADMIN のパーミッションをつけるユーザを間違えてた。だけ。。orz

Redhat のパッケージ管理システムが変わってた。


トゲトゲ草



※写真は本文と関係ありません。


# up2date –register しようとしたらコマンドがない。。(´・ω・`)

Red Hat Enterprise Linux 5 (Part1:up2dateからyumへ)

RedhatEL5 から yum に変わったらしい。

大丈夫!yum ならわかる!(`・ω・´)


# yum list
Loading "rhnplugin" plugin
Loading "security" plugin
This system is not registered with RHN.
RHN support will be disabled.
Installed Packages
Deployment_Guide-en-US.noarch            5.2-9                  installed       
Deployment_Guide-ja-JP.noarch            5.2-9                  installed       
GConf2.i386                              2.14.0-9.el5           installed       
GConf2-devel.i386                        2.14.0-9.el5           installed       
ImageMagick.i386                         6.2.8.0-4.el5_1.1      installed       
MAKEDEV.i386                             3.23-1.2               installed       
…



# yum check-update
Loading "rhnplugin" plugin
Loading "security" plugin
This system is not registered with RHN.
RHN support will be disabled.
Skipping security plugin, no data
Skipping security plugin, no data
Skipping security plugin, no data


ん?あれ?やっぱり register しないとダメだよねぇ。。(´・ω・`)

よし、取説取説…。
2.2. Registration – Red Hat Network 5.0.0
Reference Guide


う。オンラインドキュメントも up2date って書いてある…。(´・ω・`)

がぁぁ。何だよ Redhat 金払ってるのにこの仕打ちかよ!!ひどい。\(^o^)/


調べたら。rhn_rediser というコマンドらしい。
で、無事 redister 。

# yum update でたくさんアップデート。

大学時代の友人たちと新年会。

急に決まった飲み会。新橋と大久保の間の韓国料理屋で焼き肉。

ここ、ここ。ぐるなび – 韓国料理 いなかや


行く前に、最近外出してないので無理矢理浅草へ…。

雷門


吉


おみくじ。吉!!!
浅草寺は凶ばっかりなのでいいの引いた!(『たとえ目的を達したとしても、それは無駄なことになります。』というのが気になるが…。)


で、飲み会。

豚の骨付きカルビ。

一皿

結構味付けが甘い。

豚カルビ

よくわからない肉。

名前のわからない肉

チャミスルを、

??眞露チャミスル

チャミスルは竹炭濾過したやつだって。(店員さんに聞いたら普通のジンロと変わらないって言われた。><)

ショットグラスみたいなのだった。

ショットグラスみたいなのでキタ。


チーズチヂミ


チーズチヂミうまい。

青唐辛子漬け。

青唐辛子漬


超不評。(´・ω・`)


ビビン冷麺


締め。おなかいっぱい。


デザート-甘いシナモン茶


甘いお茶。


と、そんな感じで終了。
まあなんと、女っ気ない集まり。

突然だったので、今回来られないメンツは来月以降で『カムジャタン』らしい。(私が行ったことあるのはココ→松屋 マツヤ – 韓国料理、韓国鍋(新大久保) [食べログ]

奥さんが病気で来られなかった A くんの奥さんが心配です。><