/bin/false と /sbin/nologin の違い
SSH ログインさせないアカウントを作る - Ceekz Logs (吉田光男@筑波の日記)
なるほどー。
やってみる。
/bin/false
# /usr/sbin/usermod -s /bin/false hoge
- su hoge してパスワード入れても何もいわれなかった。
- 別サーバから ssh hoge@foo.com したら下のように言われた。
Last login: Mon May 26 17:00:04 2008 from xxx.xxx.xxx.xxx
Connection to foo.com closed.
/sbin/nologin
# /usr/sbin/usermod -s /sbin/nologin hoge
- su hoge してパスワード入れたら下のように言われた。
This account is currently not available.
- 別サーバから ssh hoge@foo.com したら下のように言われた。
Last login: Mon May 26 17:00:20 2008 from xxx.xxx.xxx.xxx
This account is currently not available.
Connection to foo.com closed.
セキュリティのこと考えると、qmail関連とか使わないユーザやリモートログインさせないユーザは /bin/false のほうがいいかも。