1. 程式人生 > >解決kali-linux更新源無法使用的問題(簽名失效)

解決kali-linux更新源無法使用的問題(簽名失效)

本來說是這個寒假好好學習一下滲透測試的,可隨著瞭解的深入,發現滲透測試需要的知識儲備太多了,因此好長時間都沒有真正的去學習滲透工具的使用,今天上午裝了一個kali,裝上之後第一件事就是執行apt-get update && apt-get upgrade,結果卻出現了這樣的錯誤
這裡寫圖片描述
我新增的是中科大的更新源,在瀏覽器中是可以正常開啟的:

deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib  
deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib

可是新增到 /etc/apt/source.list之後,執行apt-update就會出現上面的錯誤提示
這個問題折磨了我一整天,直到剛剛才解決掉,去網上搜,關於這種錯誤的帖子只有一兩個,而且還都是提問的帖子,都掛在那沒有解決。。。。因此我在解決了這個問題之後,立馬就過來寫了這篇部落格,供各位網友參考,說不定就能解決你的問題

在多方搜尋無果之後,我決定靜下心來認真閱讀一下kali中提供的文件,根據上面的提示,我查看了apt-secure(8)——>命令man 8 apt-secure

DESCRIPTION
       Starting with version 0.6, APT contains
code that does signature checking of the Release file for all repositories. This ensures that data like packages in the archive can't be modified by people who have no access to the Release file signing key. Starting with version 1.1 APT requires repositories to provide recent authentication information for
unimpeded usage of the repository. Since version 1.5 changes in the information contained in the Release file about the repository need to be confirmed before APT continues to apply updates from this repository. Note: All APT-based package management front-ends like apt-get(8), aptitude(8) and synaptic(8) support this authentication feature, so this manpage uses APT to refer to them all for simplicity only.

首先閱讀一下apt-secure的描述,讀完之後我們可以知道,之所以一直更新不成功,是因為沒有簽名或者是有簽名但是apt沒有對應的key的package是不被信任的,安全起見,預設是不會採用這種源來進行更新的

繼續往下閱讀

UNSIGNED REPOSITORIES
       If an archive has an unsigned Release file or no Release file at all
       current APT versions will refuse to download data from them by default
       in update operations and even if forced to download front-ends like
       apt-get(8) will require explicit confirmation if an installation
       request includes a package from such an unauthenticated archive.

       You can force all APT clients to raise only warnings by setting the
       configuration option Acquire::AllowInsecureRepositories to true.
       Individual repositories can also be allowed to be insecure via the
       sources.list(5) option allow-insecure=yes. Note that insecure
       repositories are strongly discouraged and all options to force apt to
       continue supporting them will eventually be removed. Users also have
       the Trusted option available to disable even the warnings, but be sure
       to understand the implications as detailed in sources.list(5). 

第二段的標題正是沒有簽名的倉庫,這正是我們需要的說明
You can force all APT clients to raise only warnings by setting the
configuration option Acquire::AllowInsecureRepositories to true.
這句話就是解決問題的關鍵,雖然國內的源沒有簽名,或者簽名過期(失效),但是我們可以強制apt進行更新,忽略倉庫的安全性,而想要達到這個目的,我們就需要對APT的配置檔案進行修改
我搜索了apt.conf這個關鍵字,但相關網頁都是英文的,硬著頭皮讀完之後發現我的kali中並沒有apt.conf檔案,在我的/etc/apt目錄下,只有一個apt.conf.d目錄,cd進該目錄:
這裡寫圖片描述
那麼多配置檔案,我也不知道到底該改哪一個,然後又去百度了一會兒,看到了這篇文章
https://wiki.debian.org/AptConf
然後我就抱著試一試的心態打開了70debconf檔案,按照前面man文件的指導,在裡面輸入了Acquire::AllowInsecureRepositories “true”;
然後執行apt-config dump,檢視apt的對應配置有無生效
這裡寫圖片描述
Acquire::AllowInsecureRepositories的屬性值由最初的”0”變成了”true”
說明更改配置成功,然後趕緊敲入apt-get update && apt-get upgrade,萬分激動地按下回車鍵

看著一行行的提示快速滾動,那種感覺真的是無與倫比。。。。

可能我的分析有不到位的地方,不過不管怎樣,問題是解決了,歡迎各位指正
希望能幫助遇到同樣問題的小夥伴:)

相關推薦

解決kali-linux更新無法使用的問題簽名失效

本來說是這個寒假好好學習一下滲透測試的,可隨著瞭解的深入,發現滲透測試需要的知識儲備太多了,因此好長時間都沒有真正的去學習滲透工具的使用,今天上午裝了一個kali,裝上之後第一件事就是執行apt-get update && apt-get upg

解決kali-linux更新簽名失效問題

1.進入/etc/apt/apt.conf.d 目錄 2.新增Acquire::AllowInsecureRepositories “true”;  3.查詢是否修改成功 命令:apt-config dump 這樣就成功了; 

kali linux 更新 許可權不夠無法修改問題

執行:/etc/apt/sources.list許可權不夠,無法修改源的問題  解決方案:leafpad /etc/apt/sources.list 然後將更新源複製在文字編輯器中儲存退出, 執行 :apt-get update     &n

Kali Linux 教程 之 Kali Linux 更新

把kali的軟體源寫進了ubunt的軟體源 第一步 (此源為1.0版本,不適用於現在2.0版)阿里雲Kali源為: deb http://mirrors.aliyun.com/kali kali

kali linux更新配置

由於kali linux只支援官方更新源,故只能在配置檔案(/etc/apt/source.list)中寫入官方更新源地址: deb http://http.kali.org/kali kali-rolling main non-free contrib deb-src

Kali Linux更新

網上能查到很多kali更新源,下面是我使用的可用的源。 # kali官方源 deb http://http.kali.org/ kali-rolling main non-free contrib deb-src http://http.kali.org/ kali-r

kali linux 更新問題

首先 在etc/apt/source.list 中使用官方源 deb http://http.kali.org/kali kali-rolling main non-free contrib (其實中

Kali Linux 更新

https 阿裏雲 獲取 yun get http linu info 執行 z 更新源是Linux必不可少的軟件獲取倉庫,安裝軟件時,程序從源獲取軟件包,才能下載到本地。 首先,打開終端,輸入 leafpad /etc/apt/sources.list,打開源列表

Kali Linux 滲透測試手冊1.1安裝虛擬機器

翻譯來自:掣雷小組 成員資訊: thr0cyte, Gr33k, 花花, 小丑, R1ght0us, 7089bAt, 一.配置KALI Linux和滲透測試環境 在這一章,我們將覆蓋以下內容: 在Windows和Linux上安裝VirtualBox 建立一個Kali L

Kali Linux安全滲透教程內部資料

Kali Linux安全滲透教程第一章(內部資料) 下載地址://pan.baidu.com/s/1dDnEL4P Kali Linux安全滲透教程第二章(內部資料) 下載地址:://pan.baidu.com/s/1dDnEL4P Kali Linux安全滲透教程第九章

解決kali更新時出現簽名無效問題

首先開啟kali新增更新源 vim  /etc/apt/sources.list  新增更新源 #中科大 deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib deb-src ht

ubuntu,kali,debian等Linux更新國內最好的

阿里雲的源是國內最好的,沒有之一 以ubuntu14.04為例,ubuntu的其他的版本的更新源請對應相應版本的名字,到網站http://mirrors.aliyun.com/上檢視有沒有。 比如ubuntu的名字叫trusty Tahr,所以源中就有tru

解決Kali Linux沒有聲音

sea audio 禁用 all 系統默認 虛擬 art 啟用 efault 解決Kali Linux沒有聲音 Kali Linux系統默認狀態下,root用戶是無法使用聲卡的,也就沒有聲音。啟用的方法如下: (1)在終端執行命令:systemctl --user en

Kali 2017更新

pre cnblogs class stc span 回車 ron apt-get ont 一、添加更新源 gedit /etc/apt/sources.list    二、國內更新源 #autodeb http://http.kali.org/kali kali-

kali修改更新更新

ren get blog -c 修改 lin main src pad 進入源文件進行修改 leafpad /etc/apt/sources.list (三選一即可) #kali官方源 deb http://http.kali.org/kali kali-ro

解決kali linux 開啟ssh服務後連接不上的問題

手機端 linu otl sshd pro 密碼 auth cati nbsp 今天在手機端裝了NetHunter 想連接PC的kali ,可是怎麽都連不上 綜合網友的經驗: 1.修改sshd_config文件,命令為:vi /etc/ssh/sshd_config

解決kali linux 升級後安裝w3af 問題

code 分享 roc 報錯 配置問題 進行 圖片 lib python 環境 1、在kali linux 下安裝w3af 會出現很多問題,因為新版的kaliLinux ,以及python 環境的配置問題和 庫的安裝問題會出現很多報錯 kali linux環境一般都

Kali Linux Vmware虛擬機器新手安裝

準備工作: 1.安裝VMware workstation 軟體 2.下載好kali linux 的ios系統檔案 3.開啟電腦的虛擬化支援(Intel VT-x/EPT或AMD-V/RVI(V)) 虛擬機器設定: 1.在VMware虛擬機器中新建虛擬機器,如圖 2.點選瀏覽,選擇Kali Li

Kali Linux Vmware虛擬機新手安裝

區域 tro too 開啟 wid 根分區 說明 光盤 color 準備工作: 1.安裝VMware workstation 軟件 2.下載好kali linux 的ios系統文件 3.打開電腦的虛擬化支持(Intel VT-x/EPT或AMD-V/RVI(V)) 虛擬機設

解決win10/win8更新無法遠端的問題

問題描述如圖所示: 原因Windows10家庭版的使用者,因為系統中沒有組策略編輯器,需要修改登錄檔來實現。 登錄檔路徑:HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters 開啟登錄檔,快捷輸入