Debian

如何關閉並重新啟動 dirmngr?

  • January 15, 2022

dirmngr 由 python-apt 使用,並被 gnupg 和 gpgsm 推薦。我試圖關閉手冊頁中共享的 dirmngr 但得到了這個 -

└─[$] dirmngr -vv --shutdown

dirmngr[9494]: error opening '/home/shirish/.gnupg/dirmngr_ldapservers.conf': No such file or directory

有人可以分享如何關閉它嗎?我嘗試--debug-level了其他技巧,但無法將其關閉。如何關閉 dirmngr ?

更新 -

[$] dpkg -l dirmngr

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                           Version              Architecture         Description
+++-==============================-====================-====================-=================================================================
ii  dirmngr                        2.1.17-3             amd64                GNU privacy guard - network certificate management service

儘管出現錯誤,但認為它已完美安裝 -

[$] systemctl --user status dirmngr

● dirmngr.service - GnuPG network certificate management daemon
  Loaded: loaded (/usr/lib/systemd/user/dirmngr.service; static; vendor preset: enabled)
  Active: active (running) since Sun 2017-01-08 14:46:21 IST; 5h 47min ago
    Docs: man:dirmngr(8)
Main PID: 1203 (dirmngr)
  CGroup: /user.slice/user-1000.slice/user@1000.service/dirmngr.service
          └─1203 /usr/bin/dirmngr --supervised

Jan 08 14:46:40 debian dirmngr[1203]: DBG: chan_5 <- KEYSERVER --clear hkp://pgp.mit.edu
Jan 08 14:46:40 debian dirmngr[1203]: DBG: chan_5 -> OK
Jan 08 14:46:40 debian dirmngr[1203]: DBG: chan_5 <- KS_GET -- 0xDAD95197
Jan 08 14:46:40 debian dirmngr[1203]: DBG: dns: libdns initialized
Jan 08 14:46:50 debian dirmngr[1203]: DBG: dns: getsrv(_hkp._tcp.pgp.mit.edu): Server indicated a failure
Jan 08 14:46:50 debian dirmngr[1203]: command 'KS_GET' failed: Server indicated a failure <Unspecified source>
Jan 08 14:46:50 debian dirmngr[1203]: DBG: chan_5 -> ERR 219 Server indicated a failure <Unspecified source>
Jan 08 14:46:50 debian dirmngr[1203]: DBG: chan_5 <- BYE
Jan 08 14:46:50 debian dirmngr[1203]: DBG: chan_5 -> OK closing connection
Jan 08 14:46:50 debian dirmngr[1203]: handler for fd 5 terminate  
systemctl --user stop dirmngr.socket
systemctl --user restart dirmngr.socket

使用目前版本的 GnuPG,您可以使用 殺死dirmngrgpgconf如下所示:

gpgconf --kill dirmngr

引用自:https://unix.stackexchange.com/questions/335641