差分
この文書の現在のバージョンと選択したバージョンの差分を表示します。
次のリビジョン | 前のリビジョン 次のリビジョン 両方とも次のリビジョン | ||
web:usermin:start [2011/08/05 23:58] yuki 作成 |
web:usermin:start [2011/09/19 03:16] yuki |
||
---|---|---|---|
ライン 4: | ライン 4: | ||
<note> | <note> | ||
* Ubuntu 10.04 Server | * Ubuntu 10.04 Server | ||
- | * 対外ドメイン : www.ainoniwa.net | ||
* Usermin経由で各ユーザのLDAPパスワード変更だけを出来るようにする。 | * Usermin経由で各ユーザのLDAPパスワード変更だけを出来るようにする。 | ||
</note> | </note> | ||
+ | |||
+ | * 基本参考 | ||
+ | * http://www.webmin.com/apache.html | ||
- userminのインストール | - userminのインストール | ||
ライン 16: | ライン 18: | ||
* ポート番号とUsermin無効ユーザの設定 | * ポート番号とUsermin無効ユーザの設定 | ||
* <code>sdiff -s miniserv.conf miniserv.conf.old | * <code>sdiff -s miniserv.conf miniserv.conf.old | ||
- | port=10001 | port=10000 | + | port=10001 | port=10000 |
- | denyusers=root guest < | + | denyusers=root guest < |
</code> | </code> | ||
* パスワード変更以外の操作は無効に。 | * パスワード変更以外の操作は無効に。 | ||
* <code>sdiff -s webmin.acl webmin.acl.old | * <code>sdiff -s webmin.acl webmin.acl.old | ||
- | user: changepass | user: at changepass chfn commands cron cshrc fetchmail file f | + | user: changepass | user: at changepass chfn commands cron cshrc fetchmail file f |
</code> | </code> | ||
* パスワード参照をfileではなくLDAP(このへんは/etc/nsswitch.confとpamで対応) | * パスワード参照をfileではなくLDAP(このへんは/etc/nsswitch.confとpamで対応) | ||
* <code>sdiff -s changepass/config changepass/config.old | * <code>sdiff -s changepass/config changepass/config.old | ||
- | passwd_cmd= | passwd_cmd=file | + | passwd_cmd= | passwd_cmd=file |
</code> | </code> | ||
+ | * /etc/pam.d/common-passwordから、use_authtokを削除 | ||
+ | * <code>#password [success=1 user_unknown=ignore default=die] pam_ldap.so use_authtok try_first_pass | ||
+ | password [success=1 user_unknown=ignore default=die] pam_ldap.so try_first_pass</code> | ||
* <code>cat /etc/pam.d/usermin | * <code>cat /etc/pam.d/usermin | ||
#%PAM-1.0 | #%PAM-1.0 | ||
ライン 35: | ライン 40: | ||
* ApacheのProxy経由でアクセスしても問題ないように。 | * ApacheのProxy経由でアクセスしても問題ないように。 | ||
* <code>sdiff -s config config.old | * <code>sdiff -s config config.old | ||
- | lang=ja_JP.euc < | + | lang=ja_JP.euc < |
- | webprefix=/lab/usermin < | + | webprefix=/pop/usermin < |
- | webprefixnoredir=1 < | + | webprefixnoredir=1 < |
- | referer=127.0.0.1 < | + | referer=127.0.0.1 < |
</code> | </code> | ||
- Aapche側の設定 | - Aapche側の設定 | ||
ライン 46: | ライン 51: | ||
</code> | </code> | ||
* Proxyモジュールの設定 | * Proxyモジュールの設定 | ||
+ | * vi /etc/apache2/mods-available/proxy.conf | ||
* <code><Proxy *> | * <code><Proxy *> | ||
AddDefaultCharset off | AddDefaultCharset off | ||
ライン 53: | ライン 59: | ||
</Proxy></code> | </Proxy></code> | ||
* sites-avaliableの設定 | * sites-avaliableの設定 | ||
- | * <code> cat default-ssl | grep Proxy | + | * <code>cat default-ssl | grep Proxy |
SSLProxyEngine On | SSLProxyEngine On | ||
- | ProxyPass /lab/usermin/ https://127.0.0.1:12241/ | + | ProxyPass /pop/usermin/ https://127.0.0.1:10001/ |
- | ProxyPassReverse /lab/usermin/ https://127.0.0.1:12241/ | + | ProxyPassReverse /pop/usermin/ https://127.0.0.1:10001/ |
</code> | </code> | ||
- 再起動 | - 再起動 | ||
ライン 62: | ライン 68: | ||
service usermin restart | service usermin restart | ||
</code> | </code> | ||
+ | |||
+ | * その他はまりどころ | ||
+ | * こんなエラー。 | ||
+ | * <code>client denied by server configuration: proxy:https://127.0.0.1:10001/</code> | ||
+ | * デフォルトだと、/etc/apache2/mods-available/proxy.confにAllow文がないとエラーになるので書く。 | ||
+ | * <code>Allow from all</code> | ||
+ | * こんなエラー。 | ||
+ | * <code>[warn] proxy: No protocol handler was valid for the URL /pop/usermin/. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.</code> | ||
+ | * proxy.loadがデフォルトだと足りないらしいので書く。 | ||
+ | * <code>LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so" >> /etc/apache2/mods-available/proxy.load</code> | ||
+ | * [error] proxy: HTTPS: failed to enable ssl support for [::1]:10001 (localhost) | ||
+ | * 以下のように書いていると、IPv6アクセスが発生して無理ぽ。localhostを127.0.0.1で記載する。(IPv6を無効にする人はご自由に) | ||
+ | * <code>ProxyPass /pop/usermin/ https://localhost:10001/</code> | ||
+ | * [error] [client 127.0.0.1] SSL Proxy requested for localhost:443 but not enabled [Hint: SSLProxyEngine] | ||
+ | * http://d.hatena.ne.jp/bushimichi/20090417/1239970196 | ||
+ | * $home/.userminに対する書き込み権限がないとパスワード変更に失敗する。 | ||
+ | * LDAPユーザのホームディレクトリが実質的に存在しない場合は/tmpとかを使えばいいんじゃないかな。 |