AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-222107

James B. Byrne's questions

Martin Hope
James B. Byrne
Asked: 2020-05-28 11:34:40 +0800 CST

我需要在使用 -newermt 和 -exec ls {} 时解释 bash 查找行为

  • 0

我有这个命令:

find /var/cache/pkg  -newermt 2020-01-30 | grep 'kdeaccessibility-4.14.3_1'

什么都不返回。我把它改成这样:

find /var/cache/pkg  -newermt 2020-01-30 -exec ls -D '%F' -l -t -r {} \; | grep 'kdeaccessibility-4.14.3_1'

并返回:

-rw-r--r--  1 root  wheel        556 2017-07-14 kdeaccessibility-4.14.3_1-6dc124e39c.txz
lrwxr-xr-x  1 root  wheel         40 2017-07-21 kdeaccessibility-4.14.3_1.txz -> kdeaccessibility-4.14.3_1-6dc124e39c.txz

因此,该-newermt选项似乎被该-exec选项禁用。但我不明白为什么。

但是,如果我添加该-type f选项,则查找按预期工作。

find /var/cache/pkg  -type f -newermt 2020-01-30 -exec ls -D '%F' -l -t -r {} \; | grep 'kdeaccessibility-4.14.3_1'

什么都没有返回。我由此推断符号链接的存在导致了这种行为,但我不明白为什么。

bash find
  • 1 个回答
  • 47 Views
Martin Hope
James B. Byrne
Asked: 2020-05-23 11:14:46 +0800 CST

无法在 debian 10.4 上安装 sshd (openssh-server)

  • 0

这是 Debian-10.4 的全新安装。sources.list 文件如下:

# deb cdrom:[Debian GNU/Linux 10.4.0 Buster - Official amd64 DVD Binary-1 20200 0509-10:26]/ buster contrib main

deb http://security.debian.org/debian-security buster/updates main contrib
deb-src http://security.debian.org/debian-security buster/updates main contrib

# buster-updates, previously known as 'volatile'
# A network mirror was not selected during install.  The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
deb http://deb.debian.org/debian/ buster-updates main contrib
deb-src http://deb.debian.org/debian/ buster-updates main contrib

当我尝试安装 sshd (openssh-serverr) 我得到这个:

[root@smb4-a ~]# apt install -f openssh-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 openssh-server : Depends: openssh-client (= 1:7.9p1-10+deb10u1) but 1:7.9p1-10+deb10u2 is to be installed
                  Depends: openssh-sftp-server but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我什至不会去想象什么样的发行版不提供作为基本安装的一部分的安全远程访问。无论 Debian 的原因是什么,我都需要这样。问题似乎是这样的:

 openssh-server : Depends: openssh-client (= 1:7.9p1-10+deb10u1) but 1:7.9p1-10+deb10u2 is to be installed

如何强制安装损坏的依赖项?

更多信息:

[root@smb4-a ~]# apt-get update
Get:1 http://deb.debian.org/debian buster-updates InRelease [49.3 kB]
Hit:2 http://security.debian.org/debian-security buster/updates InRelease
Get:3 http://deb.debian.org/debian buster-updates/main Sources [3,088 B]
Get:4 http://deb.debian.org/debian buster-updates/main amd64 Packages [7,380 B]
Get:5 http://deb.debian.org/debian buster-updates/main Translation-en [5,166 B]
Fetched 64.9 kB in 0s (358 kB/s)           
Reading package lists... Done
[root@smb4-a ~]# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

更多信息:

# apt policy openssh-*
openssh-sftp-server:
  Installed: (none)
  Candidate: 1:7.9p1-10+deb10u1
  Version table:
     1:7.9p1-10+deb10u1 500
        500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
openssh-tests:
  Installed: (none)
  Candidate: 1:7.9p1-10+deb10u1
  Version table:
     1:7.9p1-10+deb10u1 500
        500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
openssh-server:
  Installed: (none)
  Candidate: 1:7.9p1-10+deb10u1
  Version table:
     1:7.9p1-10+deb10u1 500
        500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
openssh-client:
  Installed: 1:7.9p1-10+deb10u2
  Candidate: 1:7.9p1-10+deb10u2
  Version table:
 *** 1:7.9p1-10+deb10u2 100
        100 /var/lib/dpkg/status
     1:7.9p1-10+deb10u1 500
        500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
debian installation dependencies ssh apt
  • 2 个回答
  • 9123 Views
Martin Hope
James B. Byrne
Asked: 2020-02-29 08:51:12 +0800 CST

ZFS:i/o 错误 - 所有块副本不可用 -zpool 不可用

  • 1

服务器重新启动在控制台上产生了以下输出:

ZFS: i/o error - all block copies unavailable
ZFS: failed to read pool zroot directory object
qptzfsboot: failed to mount default pool zroot

FreeBSD/x86 boot
ZFS: i/o error - all block copies unavailable
ZFS: can't fild dataset 0
Default: zroot/<0x0>
boot:

我从 usb livecd 启动主机并在 /tmp 下挂载 /etc 目录以启用 ssh 访问:

ifconf -a # get available i/f names
ifconf em0 inet 192.168.216.46
route add default 192.168.216.1
hostname vhost06.internal
mkdir /tmp/etc
mount_unionfs /tmp/etc /etc
echo 'PermitRootLogin yes' >> /etc/sshd_config
passwd
Changing local password for root
New Password:
Retype New Password:
service sshd onestart

没有可导入的 zfs 池:

root@vhost06:~ # zpool status
no pools available
root@vhost06:~ # zpool list
no pools available
root@vhost06:~ # zfs list
no datasets available

gpart显示这个几何:

gpart 显示

=>         40  15628053088  ada0  GPT  (7.3T)
           40         1024     1  freebsd-boot  (512K)
         1064          984        - free -  (492K)
         2048     16777216     2  freebsd-swap  (8.0G)
     16779264  15611273216     3  freebsd-zfs  (7.3T)
  15628052480          648        - free -  (324K)

=>         40  15628053088  ada1  GPT  (7.3T)
           40         1024     1  freebsd-boot  (512K)
         1064          984        - free -  (492K)
         2048     16777216     2  freebsd-swap  (8.0G)
     16779264  15611273216     3  freebsd-zfs  (7.3T)
  15628052480          648        - free -  (324K)

=>         40  15628053088  ada2  GPT  (7.3T)
           40         1024     1  freebsd-boot  (512K)
         1064          984        - free -  (492K)
         2048     16777216     2  freebsd-swap  (8.0G)
     16779264  15611273216     3  freebsd-zfs  (7.3T)
  15628052480          648        - free -  (324K)

=>         40  15628053088  ada3  GPT  (7.3T)
           40         1024     1  freebsd-boot  (512K)
         1064          984        - free -  (492K)
         2048     16777216     2  freebsd-swap  (8.0G)
     16779264  15611273216     3  freebsd-zfs  (7.3T)
  15628052480          648        - free -  (324K)

=>         40  15628053088  diskid/DISK-VAGWJ6VL  GPT  (7.3T)
           40         1024                     1  freebsd-boot  (512K)
         1064          984                        - free -  (492K)
         2048     16777216                     2  freebsd-swap  (8.0G)
     16779264  15611273216                     3  freebsd-zfs  (7.3T)
  15628052480          648                        - free -  (324K)

=>         40  15628053088  diskid/DISK-VAGWV89L  GPT  (7.3T)
           40         1024                     1  freebsd-boot  (512K)
         1064          984                        - free -  (492K)
         2048     16777216                     2  freebsd-swap  (8.0G)
     16779264  15611273216                     3  freebsd-zfs  (7.3T)
  15628052480          648                        - free -  (324K)

=>         40  15628053088  diskid/DISK-VAHZAD2L  GPT  (7.3T)
           40         1024                     1  freebsd-boot  (512K)
         1064          984                        - free -  (492K)
         2048     16777216                     2  freebsd-swap  (8.0G)
     16779264  15611273216                     3  freebsd-zfs  (7.3T)
  15628052480          648                        - free -  (324K)

=>         40  15628053088  diskid/DISK-VAH3PXYL  GPT  (7.3T)
           40         1024                     1  freebsd-boot  (512K)
         1064          984                        - free -  (492K)
         2048     16777216                     2  freebsd-swap  (8.0G)
     16779264  15611273216                     3  freebsd-zfs  (7.3T)
  15628052480          648                        - free -  (324K)

=>       1  30240767  da0  MBR  (14G)
         1      1600    1  efi  (800K)
      1601   2012560    2  freebsd  [active]  (983M)
   2014161  28226607       - free -  (13G)

=>      0  2012560  da0s2  BSD  (983M)
        0       16         - free -  (8.0K)
       16  2012544      1  freebsd-ufs  (983M)

=>       1  30240767  diskid/DISK-00241D8CE51BB011B9A694C1  MBR  (14G)
         1      1600                                     1  efi  (800K)
      1601   2012560                                     2  freebsd  [active]  (983M)
   2014161  28226607                                        - free -  (13G)

=>      0  2012560  diskid/DISK-00241D8CE51BB011B9A694C1s2  BSD  (983M)
        0       16                                          - free -  (8.0K)
       16  2012544                                       1  freebsd-ufs  (983M)

我该如何从这里恢复?

<--------原始问题结束

我已经取得了一些进展,并设法导入和挂载了一个根数据集——iocage。这是zfs 系统上的启动,但我找不到包含根文件系统的数据集,因此我无法访问 /var/log 以查看是否存在任何内容:

mkdir /tmp/zroot                       # /tmp is a writable file system
zpool -f zroot                         # force the zpool import
zfs set mountpoint=/tmp/zroot  zroot   # mount the imported pool in a writable fs
zfs mount -a                           # find and mount all the datasets
ll /tmp/zroot
total 12
drwxr-xr-x  9 root  wheel  11 Feb 27 13:09 iocage/

幸运的是,所有绝对关键的东西都在里面/zroot/iocage,因为主机只是充当监狱的平台。但是,缺少根数据集对我来说很麻烦。

Azpool status显示 zroot 没有错误。

接下来,我使用zfs send.

zfs snapshot -r zroot/iocage@vh6iocsend1
zfs send -R zroot/iocage@vh6iocsend1 | ssh 192.168.216.45 zfs receive zroot/iocagev6

这需要一段时间,但它已成功完成。

现在我需要启动问题主机。这台主机昨天中午重启没问题。我不记得运行freebsd-update fetch了,但是即使我有任何东西可以获取,因为系统已经在 12.1p2

我仍然需要帮助让主机启动。

<----------

补充说明:

我能够zpool使用以下altroot选项安装整个zpool import:

  1. 启动到 live cd shell。
  2. 导入 zfs 池,但不允许import自动挂载任何数据集:zpool import -o altroot=/tmp/altroot -N -a。
  3. 首先挂载根/数据集:zfs mount zroot/ROOT/default.
  4. 现在挂载剩余的数据集:zfs mount -a.

整个zroot池的文件系统现在可以在/tmp/altroot.

我已经使用它zfs send来将内容移动/var到另一个主机。实际上,我发送了整个池。

但是,原来的系统仍然无法启动。

freebsd zfs usb-boot
  • 2 个回答
  • 2487 Views
Martin Hope
James B. Byrne
Asked: 2020-01-18 08:36:51 +0800 CST

将内存监狱从一台主机转移到另一台主机的推荐方法是什么

  • 0

在 FreeBSD-12.0p12 上运行的源 iocage 厚监狱目标 FreeBSD-12.1p1

两台主机都在使用 zfs。

将现有的 iocage 厚监狱从源转移到目的地的推荐方法是什么?是不是很简单:

rsync -aqz -e "ssh -o LogLevel=error"  /zroot/iocage/jails/testjail \
                           destination:/zroot/iocage/jails

假设两台主机上都安装了iocage,zfs 挂载点如上所示,源jail 已关闭,并且目标主机上不存在testjail。

freebsd
  • 1 个回答
  • 255 Views
Martin Hope
James B. Byrne
Asked: 2019-12-13 13:39:08 +0800 CST

FreeBSD-12 IOCage 修改监狱的 /root 目录

  • 0

将 .bash_profile 从主机系统复制到 iocage 瘦监狱的 /root 目录不会创建 root 用户在登录到该监狱时可见的文件的原因是什么?

换句话说,如果我从主机系统执行此操作:

cp -p .bash_profile /zroot/iocage/jails/testjail/root/

然后ls -al /zroot/iocage/jails/testjail/root/.bash_profile显示该文件存在。

ls -al /zroot/iocage/jails/testjail/root/.bash_profile
-rwxr-xr-x  1 root  wheel  3274 Dec 12 15:42 /zroot/iocage/jails/testjail/root/.bash_profile

但是,当我登录到 testjail 时,root 用户看不到该文件:

iocage console testjail
ls -a .bash_profile
ls: .bash_profile: No such file or directory

如果我检查主机系统上的安装,那么我会看到以下其他内容:

zroot/iocage/jails/testjail/root on /zroot/iocage/jails/testjail/root (zfs, local, noatime, nfsv4acls)

我相信这是我困难的根源。如何将文件放入 iocage 监狱的 /root 目录,以便监狱内的 root 用户可以使用它?

freebsd
  • 2 个回答
  • 348 Views
Martin Hope
James B. Byrne
Asked: 2019-04-12 11:26:54 +0800 CST

DNSSEC Bind-9.11 自动管理和内联更新

  • 0

我试图了解 Bind 如何在没有外部干预的情况下管理 DNSSEC 区域密钥签名。具体是什么进程(命名?)检测到区域签名即将到期,检测和退出的方法是什么。

named 是否会定期轮询所有区域键,然后产生更新过程?除了下面列出的设置之外,是否需要自动维护才能正常工作?更新是否必须由 rndc 触发或重新加载命名?

. . .
options {
  . . .
  dnssec-enable yes;
  key-directory "/usr/local/etc/namedb/master/";
  dnssec-validation auto;
. . .
}
. . .
zone example.com {
  type master;
  file "/usr/local/etc/namedb/master/example.com.hosts";
  key-directory "/usr/local/etc/namedb/master/";
  auto-dnssec maintain;
  inline-signing yes;
};
bind
  • 1 个回答
  • 562 Views
Martin Hope
James B. Byrne
Asked: 2019-04-12 08:18:30 +0800 CST

在 FreeBSD 上,使用什么工具来显示区域的 DNSSEC 签名到期日期?

  • 0

我们使用 FreeBSD-12 和 Bind-9.11.6。我们为某些域启用了 DNSSEC。我希望验证这些区域的签名到期日期。我似乎无法找到有关如何完成此操作的任何信息。有人可以向我提供这些信息吗?

bind
  • 1 个回答
  • 227 Views
Martin Hope
James B. Byrne
Asked: 2019-04-11 05:20:14 +0800 CST

如何更改 https 的证书和密钥

  • 3

我们有一台服务器,其原始 PKI 证书是由已停产的根 CA 颁发的。我们有一个从不同的根授权链颁发的替换证书。该站点是在不久前建立的,并建立了 Strict-Transport-Security。

服务器密钥为 4096 位。旧的 CA 根私钥为 1024 位(于 2006 年发布)。

如何为启用 Strict-Transport-Security 的站点切换 PKI 密钥和证书?我已经搜索过这方面的信息,但到目前为止都是空的。

apache-2.4
  • 1 个回答
  • 314 Views
Martin Hope
James B. Byrne
Asked: 2018-05-05 10:19:25 +0800 CST

更改 squirrelmail 文件夹树显示选项不会改变用户界面中的外观

  • 0
FreeBSD-11.1 and CentOS-6.9
Apache-2.4 and Apache-2.2
SquirrelMail-1.4.23 and SquirrelMail-1.4.22

我发现我无法更改 SM 用户界面左侧框架中文件夹树显示的格式。在我们现有的 Centos-6.9/Apache-2.2/SquirrelMail-1.4.22 上,我的文件夹显示选项设置为缩进,这就是它的显示方式。但是,如果我将选项更改为 Long 或 Delimited,提交更改并重新加载页面,文件夹树显示不会从 Indented 更改。

同样,在我们在 FreeBSD-11.1/Apache-2.4/SM-1.4.23 上安装的新 SM 中,我选择的文件夹显示选项是缩进的,但文件夹树显示为分隔,并且在文件夹首选项选项中没有将设置切换为分隔、长或back to Indented 会产生任何可见的变化。

在这两种情况下,更改选项都是粘性的,因为所选选项仍然存在。它只是对显示没有影响。

这两天我在SM用户列表上问过这个问题两次,都没有收到回复。

有没有其他人遇到过这个问题?关于导致它的原因有什么想法吗?

squirrelmail
  • 1 个回答
  • 19 Views
Martin Hope
James B. Byrne
Asked: 2018-03-01 08:50:57 +0800 CST

需要重置 USB 闪存棒上的脏位

  • 1

我们有一个 USB 记忆棒,FreeBSD-11 不会挂载它,因为它的文件系统不干净。它不干净,因为它是在安装在 FreeBSD-11 系统上时从延长电缆上移除的。但是,我们在删除它时没有发现任何文件活动。

我们无法获取fsck或fsck_ffs找到超级块,因此这些将不会运行。即使我们提供fsck_ffs -b使用newfs -N它找到的超级块地址,也不会将块位置视为超级块。

我们如何清除脏位以便我们可以挂载设备?

filesystems
  • 1 个回答
  • 1191 Views
Martin Hope
James B. Byrne
Asked: 2016-11-15 14:13:30 +0800 CST

DANE Trust Anchor - 自签名与否

  • 3

我们运行私有 CA 并同时使用 DNSSEC 和 DANE。最近我们决定重新发布我们的 CA 根密钥和颁发者密钥,因为这些密钥是在 2008 年设置 PKI 时以 1024 位生成的。我们最初的 TLSA RR 将发布 CA 指向信任锚。然而,重新阅读 RFC 和各种与 DANE 相关的评论提出了是否应该使用 ROOT 公钥的问题。

我们目前正在与我们现有的 DANE 记录平行地试验这个想法。当我们使用https://dane.sys4.de/smtp/进行验证时,我们现有的服务器密钥会检出,但即使我们尚未将服务器密钥切换到新的证书链,也会报告新的 ROOT TLSA 记录。此外,报告了新的信任锚 TLSA RR:

可用的 TLSA 记录

2, 1, 2 c26e0ec16a46a973[...]ce60eabc5adba90e - self signed certificate in certificate chain: (19)

而同一主机的当前 TLSA RR 以这种方式报告:

2, 0, 2 67274b3554289058[...]5fd3917510e6722a

报告的第一条记录是指新的根 CA。第二个是指原来的Issuing CA(由原来的Root CA签名)。

当我检查消息时self signed certificate in certificate chain: (19),我形成的印象是这是一个错误。但是,如果这是一个错误,那么 CA Root 公钥究竟在哪里适合 DANE 方案?

domain-name-system dnssec
  • 1 个回答
  • 276 Views
Martin Hope
James B. Byrne
Asked: 2015-03-24 09:43:17 +0800 CST

无论如何使用 rsa 证书身份验证和 imapsync

  • 2

我们有一个异地热备份主机,我希望使用 imapsync 定期同步我们的 imap 服务器。我想知道是否可以对 --authuser1 到 --authuser2 登录使用 RSA 证书身份验证。如果我在 ssh 上使用 rsync,那么这没有问题。但是通过 imapsync 连接到 cyrus-imap 需要更多的参与。

如果不是,那么当在脚本中迭代运行时,将 authuser 密码传递给 imapsync 命令的推荐方法是什么?

centos6
  • 1 个回答
  • 90 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve