プロキシー経由でyumで認証が必要な操作を行いたいが、認証が通らない

このQ&Aのポイント
  • 認証が必要なプロキシー経由でyumを行いたいが、認証が通らないという問題が発生しています。
  • /etc/yum.confを編集してプロキシーの設定を行っていますが、ユーザIDやパスワードの値に問題がある可能性があります。
  • タイムアウトエラーが発生するため、プロキシーサーバーの設定値は正しいものと思われますが、他の原因も考えられます。
回答を見る
  • ベストアンサー

認証が必要なプロキシー経由でyum

お世話になります。 認証が必要なプロキシー経由でyumを行いたいのですが認証が通らず困っています。 OS: CentOS release 5.5 (Final) /etc/yum.confを編集 proxy=http://プロキシーサーバー名:8080 proxy_username=ユーザID proxy_password=パスワード(平文で設定) 上記設定を外すとタイムアウトが発生するので、確実に使っているようですがユーザID・パスワードの設定値がおかしいようです。 Firefoxでブラウジングはできるので上記の値は間違っていないと思いますが認証が通らない原因として考えられることはありますでしょうか? 【実行例】 root@localhost etc]# yum update Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=addons error was [Errno 14] HTTP Error 407: Proxy authentication required Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was [Errno 14] HTTP Error 407: Proxy authentication required 以下省略

質問者が選んだベストアンサー

  • ベストアンサー
  • maesen
  • ベストアンサー率81% (646/790)
回答No.2

一応可能性としてですが、 firefoxはOKで、yumやwgetはNGとのことなので、 この現象を見ると、使用されているProxyサーバはNTLM認証を要求していませんでしょうか? つまり、ProxyサーバがWindows Serverであるようなケースです。 管理者の方に確認してはいかがでしょうか。 firefoxはLinux版でもそれ自体でNTLM認証をサポートしているようです。 もし、NTLM認証ならばyumやwgetで認証を通すにはちょっと工夫が必要なようです。 (実際に実施したことは無いです) NTLM認証でなければご容赦ください。

miruha2011
質問者

お礼

アドバイスありがとうございます。 ご指摘の通りでした。 NTLM認証に対応できる「cntlm」をローカルプロキシーとすることで回避できました。

その他の回答 (1)

  • pakuti
  • ベストアンサー率50% (317/631)
回答No.1

Proxyサーバーの管理者に聞いた方が早いかと 考えられる理由 ・ブラウザ規制

miruha2011
質問者

お礼

ご回答ありがとうございます。 ブログ等一部規制はありますが、業務上必要なものは規制していないとのことです。 yumと同様にwgetも試してみましたが同様の現象でした。 wgetが失敗するURLに同じマシン上のブラウザからアクセスすると正常にアクセスできます。 そのため、認証情報の書き方が間違っているのではないかと思っていますが自分では原因がわからず困っています。

miruha2011
質問者

補足

プロキシサーバーは4台あり、ラウンドロビン方式で毎回違うIPアドレスを返します。この変がおかしいのかと思い、hostsに書いてIPアドレスを固定にしてもだめでした。

関連するQ&A

  • yumが使えなくなってしまいました。

    CentOSを使っています。 特に設定ファイルを編集した覚えはなく、 調べてはみたのですが分からなくて困っています。 できれば教えていただけないでしょうか? [root@localhost yum.repos.d]# yum install yum Setting up Install Process Setting up repositories Cannot find a valid baseurl for repo: update Error: Cannot find a valid baseurl for repo: update [root@localhost yum.repos.d]# less CentOS-Base.repo #released updates [update] name=CentOS-$releasever - Updates mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4

  • CentOSでyumアップデートできなくなりました。

    こんにちは、CentOS 4.5を使っております。 ・ネットワーク環境上、Proxy不要 ・yum-plugin-fastestmirrorをインストール ・/etc/yum.repos.d/CentOS-Base.repo↓ [base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&cc=JP #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=1 protect=1 #released updates [update] name=CentOS-$releasever - Updates mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&cc=JP #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=1 protect=1 #packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons&cc=JP #baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=1 protect=1 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&cc=JP #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4 priority=1 protect=1 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&cc=JP #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ gpgcheck=1 ・/etc/yum.conf↓ [main] cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest installonlypkgs=kernel kernel-smp kernel-devel kernel-smp-devel kernel-largesmp kernel-largesmp-devel kernel-hugemem kernel-hugemem-devel distroverpkg=centos-release tolerant=1 exactarch=1 retries=20 obsoletes=1 gpgcheck=1 plugins=1 5007/08/28からすべてのレポジトリに接続できなくなっています。 baseurlをftp.riken.jpにしても接続できませんでした。 どなたか解決策をご教授ください、お願いいたします。

  • yumでvsftpd をインストールできない

    こんにちは。 【環境] Windows XP Pro SP3 VMWare 1.0.5 ゲストOSにCentOS 5.1をインストール後、vsftpdをインストールしようとしましたが、エラーになりインストールできません。Linux上では、インターネットには接続できない状態です。(光回線)どのように対応したらよいのでしょうか? [コンソール] [root@localhost /]# yum -y install vsftpd Loading "installonlyn" plugin Setting up Install Process Setting up repositories Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=extras error was [Errno 4]IOError: <urlopen error (-3. 'xe5ヽx90ヽxe5ヽx89ヽx8dヽxe8ヽxa7ヽxa3ヽxe6ヽxb1ヽxbaヽxe6ヽx99ヽx82ヽxe3ヽx81ヽxaeヽxe4ヽxb8ヽx80ヽxe6ヽx99ヽx82ヽxe7ヽx9aヽx84ヽxe3ヽx81ヽxaaヽxe5ヽxa4ヽxb1ヽxe6ヽx95ヽx97')> Error:Cannot find a valid baseurl for repo: extras

  • LinuxのCentOS6.4についての質問

    CentOS6.4を新しいPCでインストールして、サーバー構築の勉強をしようとしているものです。manコマンド(オンラインマニュアルのコマンド)をyumコマンドでインストールしようとするとエラーが出て困っています。 ちなみに会社のPCで同じバージョンでmanをインストールしてみたんですが、エラーなくインストールできました(ネットにはつながっていません) ハードディスクを初期化して最初からやり直そうと思ったんですが、もともとOSはLinuxなので操作にはあまり慣れておらずちょっと怖いです。 次の行からコンソール上の画面を表示します。一応自分なりに調べてみたんですが、さっぱりわかりません。 yum install man Loaded plugins : fastestmirror Loading mirror sppeds from cached hostfile Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo-os error was 14:PYCURL ERROR 6- "Couldn't resolve host 'mirrorlist.centos.org'" Error : Cannot find a valid baseurl for repo : base

  • centOS5.3 インストール後の設定 yum

    linuxに関して完全に初心者です。ネットワークの知識なんかもほぼありません。 今、 http://centossrv.com/centos5-init.shtml このサイトを参考にして設定を進めているのですが、いきなりつまづいてしましました。 (4)rootになれるユーザを管理者のみにする までは進めたのですが、(5)以降ができません。 色々といじってしまったかもしれなくてわけがわからない状態です…。最初どんな表示がでたのかは覚えていませんが、今現在は /etc/rc.d/init.d/yum-updatesd stop を実行すると -bash: /etc/rc.d/init.d/yum-updatesd: No such file or directory(そのようなファイルはフォルダにない?) と表示されます。 yum -y remove yum-updatesd を実行すると Loaded plugins: fastestmirror Setting up Remove Process No Match hor argument: yum-updatesd No Packages marked for removal と表示されます。 yum -y install yum-fastestmirror を実行すると Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=i386&repo=os error was [Error 4] IOError: <urlopen error (-3, 'temporary failure in name resolution')> Error: Cannot find a valid baseurl for repo: base と表示されます。 yum -y update を実行すると yum -y install yum-fastestmirrorの時と同じ結果が返ってきます。 yum -y install yum-cron を実行すると yum -y install yum-fastestmirrorの時と同じ結果が返ってきます。 /etc/rc.d/init.d/yum-cron start を実行すると -bash: /etc/rc,d/init.d/yum-cron: No such file or directory と表示されます。 chkconfig yum-cron on を実行すると error reading information on service yum-cron: No such file or directory と表示されます。 インストールの時点のホスト名やIPアドレスに関しては、 http://centossrv.com/centos5.shtml と同じように設定しました。 こんな序盤でつまづくなんて恥ずかしいですが、全く意味がわからず本当に困っています…。そもそもパッケージというものが何なのかすら分かっていません。 こんな状態ですが、どうか助けていただけないでしょうか?よろしくお願いします。

  • yumのリポジトリエラーの修復

    こんにちは、現在Fedora9をインストールしてサーバを構築しています。 数日前からyumコマンドで以下のエラーが出るようになってしまいました。 yum update Loaded plugins: refresh-packagekit Could not retrieve mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f9.newkey&arch=i386 error was [Errno 4] IOError: <urlopen error (113, 'No route to host')> Error: Cannot retrieve repository metadata (repomd.xml) for repository: updates-newkey. Please verify its path and try again リポジトリエラーだということは判明したのですが、updates-newkeyに関してはどこを修正してよいのか分かりません。 ネットワークは外部につながっており、ping mirrors.fedoraproject.orgは正常にレスポンスが返ってきます。 wgetでパッケージを取得しようとした際は以下のエラーが出ます。 wget http://ftp.jaist.ac.jp/pub/Linux/Fedora/updates/9/i386.newkey/LabPlot-doc-it-1.6.0.2-3.fc9.i386.rpm --2009-03-15 09:37:59-- http://ftp.jaist.ac.jp/pub/Linux/Fedora/updates/9/i386.newkey/LabPlot-doc-it-1.6.0.2-3.fc9.i386.rpm Resolving ftp.jaist.ac.jp... 150.65.7.130 Connecting to ftp.jaist.ac.jp|150.65.7.130|:80... failed: No route to host. 名前解決の問題でしょうか? よろしくお願いします。

  • Linux(Fedora9)でインターネットできない

    Linux(Fedora9)でサーバを構築しています。 内部のネットワークは繋がっている(ping、traceroute共に飛ぶ)のですが、 外部ネットワークに繋がっていない(ネットが見れない)状態で、 yumやwget等も使えません。 ネットサイトの方で調べたnetwork・NetworkManager等の設定も行ったのですが 変化が見られません。 IPアドレス、サブネットマスク等も設定を済ませています。 デュアルブート環境ではありません。 有線でLANを使用しております。 「yum update yum」と入力すると以下のエラー文が表示されます。 Load plugins : refresh-packagekit. Repository updates released is name in configuration, using id. Could not retrieve mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-9%arch=i386 error was. [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')> Error: Cannot retrieve repository metadate (repomd.xml) for repository: fedora. Please verify its path and try again. 情報が不足している箇所等があればご教示ください。 よろしくお願いいたします。

  • yumが使えなくなった

    Fedora 7をLive CDからインストールした後、/etc/yum.repos.d/fedora.repoを以下のように変更してyumを使うと、エラーが出てパッケージのインストール等ができない状況になりました。 同じエラーメッセージでいろいろ調べてみたのですが、リポジトリへのアクセスが集中しているのが原因というのが多いようでした。 しかし、時間を置いて、朝、昼、夜とyumを実行してみても同じエラーが出ますし、他のfedora 7のマシンでは正しくyumでパッケージの管理ができました。 おそらく設定等が原因かと思いますが、原因と対処について教えていただけないでしょうか。よろしくお願いします。 エラー内容:------------------------------------------------------- Loading "installonlyn" plugin Setting up Install Process Parsing package install arguments http://ftp.iij.ad.jp/pub/linux/fedora/releases/7/Everything/i386/os/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-2, '\xe5\x90\x8d\xe5\x89\x8d\xe3\x81\xbe\xe3\x81\x9f\xe3\x81\xaf\xe3\x82\xb5\xe3\x83\xbc\xe3\x83\x93\xe3\x82\xb9\xe3\x81\x8c\xe4\xb8\x8d\xe6\x98\x8e\xe3\x81\xa7\xe3\x81\x99')> Trying other mirror. http://ftp.riken.jp/Linux/fedora/releases/7/Everything/i386/os/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-2, '\xe5\x90\x8d\xe5\x89\x8d\xe3\x81\xbe\xe3\x81\x9f\xe3\x81\xaf\xe3\x82\xb5\xe3\x83\xbc\xe3\x83\x93\xe3\x82\xb9\xe3\x81\x8c\xe4\xb8\x8d\xe6\x98\x8e\xe3\x81\xa7\xe3\x81\x99')> Trying other mirror. http://ftp.jaist.ac.jp/pub/Linux/Fedora/releases/7/Everything/i386/os/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-2, '\xe5\x90\x8d\xe5\x89\x8d\xe3\x81\xbe\xe3\x81\x9f\xe3\x81\xaf\xe3\x82\xb5\xe3\x83\xbc\xe3\x83\x93\xe3\x82\xb9\xe3\x81\x8c\xe4\xb8\x8d\xe6\x98\x8e\xe3\x81\xa7\xe3\x81\x99')> Trying other mirror. Error: Cannot open/read repomd.xml file for repository: fedora fedora.repo ------------------------------------------------------ [fedora] name=Fedora $releasever - $basearch #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/ baseurl=http://ftp.jaist.ac.jp/pub/Linux/Fedora/releases/7/Everything/i386/os http://ftp.iij.ad.jp/pub/linux/fedora/releases/7/Everything/i386/os http://ftp.riken.jp/Linux/fedora/releases/7/Everything/i386/os #mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY [fedora-debuginfo] name=Fedora $releasever - $basearch - Debug #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/ mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-$releasever&arch=$basearch enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY [fedora-source] name=Fedora $releasever - Source #baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/ mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

  • VirtualBoxでブリッジアダプター時のyum

    VirtualBoxでネットワークをブリッジアダプタ設定したCentOS7.8をインストールしたのですが、yumがどうしても通りません。 pingは通るので良くありがちなDNS設定ミスではないのかなと思うのですが、何が悪いのかヒントでも頂けますと幸いです。 なお、yum updateでretrieveエラー(Could not retrieve mirrorlist http://mirrorlist.centos.org/~・・・)になりますが、その直後にpingでmirrorlist.centos.orgへの接続を確認すると問題なくping応答は帰ってきます。 なお、ネットワークをNAT設定とした場合は問題なくyum updateが通っているので上位のルーター等の設定が悪いのではなく、VirtualBoxかCentOSのネットワーク設定が悪いのだろうな、というところまで切り分けはできています。 なお、 /etc/sysconfig/network-scripts/ifcfg-enp0s3 の設定は以下の通りです。(一応、UUIDだけ隠してはいます) ============== TYPE="Ethernet" PROXY_METHOD="none" BROWSER_ONLY="no" BOOTPROTO="dhcp" DEFROUTE="yes" IPV4_FAILURE_FATAL="no" IPV6INIT="yes" IPV6_AUTOCONF="yes" IPV6_DEFROUTE="yes" IPV6_FAILURE_FATAL="no" IPV6_ADDR_GEN_MODE="stable-privacy" NAME="enp0s3" UUID="******-****-****-****-*********" DEVICE="enp0s3" ONBOOT="yes" DNS1=192.168.1.1 ================ VirtualBoxのネットワーク設定は添付の通りです。

  • yumがインストールできない

    はじめまして宜しくお願いします。 OSはCENTOS6.1です。 yum自体が入っておらずgoogleで色々検索したのですが、インストールの方法が見つかりません。 ためしにやってみたことは rpm -q yum とすると当然 package yum is not installed となってしまいます。 wget http://ftp.iij.ad.jp/pub/linux/centos/6/os/i386/Packages/yum-3.2.27-14.el6.centos.noarch.rpm とすると --2012-09-15 20:01:48-- http://ftp.iij.ad.jp/pub/linux/centos/6/os/i386/Packages/yum-3.2.27-14.el6.centos.noarch.rpm Resolving ftp.iij.ad.jp... 202.232.140.143, 202.232.140.144, 2001:240:bb8f::f:301, ... Connecting to ftp.iij.ad.jp|202.232.140.143|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2012-09-15 20:01:49 ERROR 404: Not Found. となってしまい先に進めません どうぞ宜しくお願い致します。