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-80389

elbarna's questions

Martin Hope
elbarna
Asked: 2025-04-07 06:12:49 +0800 CST

如何在 NetBSD 上使用 blkdiscard 时防止数据丢失

  • 5

在 Linux 上,此命令

fstrim -av

我将删除所有未使用的块(这在虚拟机磁盘上尤其重要,在 SSD 上也有必要,以便保留/获得更长的持续时间)。NetBSD 有一个类似的命令,名为blkdiscard

此命令将擦除整个磁盘,因此它将变得无法使用(如果我错了,请纠正我)

blkdiscard -v /dev/rwd...

我看到有一个标志,它在某些字节(或 MB)之后开始丢弃

blkdiscard -v -f 256m -m 128m /dev/rwd0c

假设我的分区使用 6GB 的数据,为了安全丢弃(我的数据仍然保留),这是正确的命令吗?

blkdiscard -v -f 6000m -m 128m /dev/rwd0c
ssd
  • 1 个回答
  • 34 Views
Martin Hope
elbarna
Asked: 2025-03-31 04:33:53 +0800 CST

是否可以调整 qemu/libvirt 映像的大小并保持虚拟大小同时不丢失数据?

  • 5

是否可以调整 qemu/libvirt 映像的大小,同时保持虚拟大小,并且不丢失数据?我解释得更好:

当您创建虚拟磁盘时

qemu-img create -f qcow2 debian-GEN.qcow2 60G

虚拟机看到60G的磁盘,但是使用的空间是虚拟机已经使用过的空间(此例子是在安装了一些软件之后)

qemu-img info debian-GEN.qcow2 
image: debian-GEN.qcow2
file format: qcow2
virtual size: 60 GiB (64424509440 bytes)
disk size: 3.1 GiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: debian-GEN.qcow2
    protocol type: file
    file length: 4.61 GiB (4948164608 bytes)
    disk size: 3.1 GiB

现在问题来了。假设我写入了 20GB 的额外数据,磁盘大小变为 23GB(3.1+20),假设我删除了 20GB 的数据(使用 rm -fr 甚至 shred),磁盘大小仍然是 23GB!我的问题是:有没有办法从虚拟磁盘中删除 20GB 未使用的数据?那么镜像返回 3.1GB(但虚拟机仍然看到 60GB 空间)?

qemu
  • 1 个回答
  • 10 Views
Martin Hope
elbarna
Asked: 2025-02-23 03:59:51 +0800 CST

讨论:为什么冻结终端?

  • 5

在 Solaris 10 上,我通过 ssh 连接

我从一位用户那里

talk marian

并出现

[Waiting for your party to respond]

在另一侧(用户 marian,在同一台机器上)

talk: connection requested by [email protected].
talk: respond with:  talk [email protected]     

我做到了(作为 marian 用户)

talk [email protected]   

返回 pippo 在他的终端上出现

talk: connection requested by [email protected].
talk: respond with:  talk [email protected]    

但屏幕冻结了 我错过了什么?

我已经尝试过 pts 和 ttys (/dev/term/a 和 /dev/term/b)

solaris
  • 2 个回答
  • 61 Views
Martin Hope
elbarna
Asked: 2025-02-22 23:22:06 +0800 CST

输出 who -l 某些列未知

  • 3

今天又是学习的一天:谁转

我输入 who -l

 who -l
UUCP            .       Feb 22 15:57  0:14    488
LOGIN      console      Feb 22 15:57  0:07    494
zsmon           .       Feb 22 15:57  0:14    495
LOGIN      console      Feb 22 16:03  0:07   1011       (:0)

第一列是线路名称(ttymon),第二列是使用的 tty,第三列是创建日期

第四列?(488,494,1011..)

solaris
  • 1 个回答
  • 39 Views
Martin Hope
elbarna
Asked: 2025-02-11 07:14:07 +0800 CST

Tar Solaris,如何使用 -k 选项?

  • 6

我想创建一个 300k 档案分割的档案,但出现错误

    tar -cf file.tar -k300 vi*       
tar: -k300: No such file or directory

我尝试将 -k 放在 -c 之前

tar -k 300 -cf file.tar vi* 
Usage: tar {c|r|t|u|x}[BDeEFhilmnopPqTvw@[0-7]][bfk][X...] [blocksize] [tarfile] [size] [exclude-file...] {file | -I include-file | -C directory file}...

tar -f file.tar -c -k 300  vi*            
Usage: tar {c|r|t|u|x}[BDeEFhilmnopPqTvw@[0-7]][bfk][X...] [blocksize] [tarfile] [size] [exclude-file...] {file | -I include-file | -C directory file}...

一种解决方法是使用 gnu tar

gtar -cv --tape-length=300k --file=file-{0..10}.tar vi*       

但我想知道如何用 Sun Tar 制作这个

tar
  • 1 个回答
  • 26 Views
Martin Hope
elbarna
Asked: 2025-02-06 07:21:18 +0800 CST

使用不同类型对不同的列进行排序,有效,只有空格才奇怪

  • 5

我有这个文件

1  you
3  me
2  their
4  us

该管道工作正常(它按数字排序第一列,按字母排序第二列)是在此处找到的另一个用户的管道

paste <(awk '{print $1}' file.txt | sort -k1n) <(awk '{print $2}' \
file.txt | gsort -V)

但现在使用带空格的单词

1  "and me"
3  me
2  their
4  us

同样的命令会产生这个

1   me
2   their
3   us
4   "and

如何产生这样的结果?

1   and me
2   their
3   us
4

我尝试过:

  • 删除数字 4

  • 使用“和我”

  • 使用“和我”

但结果不正确

sort
  • 1 个回答
  • 37 Views
Martin Hope
elbarna
Asked: 2025-01-29 06:00:44 +0800 CST

为什么 nfsd 版本 4 从 rpcinfo 输出中消失?

  • 5

在 Solaris 上,我使用这些选项启用 nfs4

vim /etc/default/nfs

# Sets the minimum version of the NFS protocol that will be registered
# and offered by the server.  The default is 2.
NFS_SERVER_VERSMIN=4

# Sets the maximum version of the NFS protocol that will be registered
# and offered by the server.  The default is 4.
NFS_SERVER_VERSMAX=4

我在 Linux 上尝试了同样的操作(语法不同)

RPC_NFSD_OPTS="-N 2 -N 3"

Nfs mount 在所有主机上都有效。但是 rpc 发生了非常奇怪的事情

在 Linux 上

rpcinfo -t 192.168.0.2 nfs
192.168.0.2: RPC: Program not registered

在 Solaris 上

rpcinfo -t 192.168.201.3 nfs
program 100003 version 4 ready and waiting

为什么 rpc 没有在 Linux 上注册 nfs4?Linux 发行版是 Slackware 15.0 内核版本 6.11.10

nfs
  • 1 个回答
  • 19 Views
Martin Hope
elbarna
Asked: 2025-01-19 15:57:26 +0800 CST

Solaris10:用户音频

  • 5

我登录CDE(或Gnome)桌面之前的情况

mplayer Taste\ of\ freedom-A\ man\ sing\ his\ song.mp3 
MPlayer 1.1-4.8.2 (C) 2000-2012 MPlayer Team

Playing Taste of freedom-A man sing his song.mp3
libavformat version 54.6.100 (internal)
Audio only file format detected.
Load subtitles in ./
==========================================================================
Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
AUDIO: 48000 Hz, 2 ch, s16le, 320.0 kbit/20.83% (ratio: 40000->192000)
Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)
==========================================================================
ao2: 48000 Hz  2 chans  s16le [0x9]

[AO SUN] Can't open audio device /dev/audio, Permission denied  -> nosound.
[AO ESD] esd_open_sound failed: No such file or directory

我登录 CDE,然后远程登录 Solaris 机器(或本地),然后

mplayer Taste\ of\ freedom-A\ man\ sing\ his\ song.mp3 
MPlayer 1.1-4.8.2 (C) 2000-2012 MPlayer Team

Playing Taste of freedom-A man sing his song.mp3
libavformat version 54.6.100 (internal)
Audio only file format detected.
Load subtitles in ./
==========================================================================
Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
AUDIO: 48000 Hz, 2 ch, s16le, 320.0 kbit/20.83% (ratio: 40000->192000)
Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)
==========================================================================
ao2: 48000 Hz  2 chans  s16le [0x9]

AO: [sun] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:   0.9 (00.8) of 198.0 (03:18.0)  0.6%                                                                                


MPlayer interrupted by signal 2 in module: play_audio
A:   0.9 (00.9) of 198.0 (03:18.0)  0.6%  

我的问题是:谁可以更改权限?要修改哪个文件才能使这些权限永久生效,即使没有登录 cde 或 gnome?

我看到改变权限的设备是:

143130628      1 crw-------   1 myuser other    273,   0 Jan 15 00:14 /devices/pseudo/oss_sadasupport@0:sound,audio
143130630      1 crw-------   1 myuser other    273,   1 Jan 15 00:14 /devices/pseudo/oss_sadasupport@0:sound,audioctl
solaris
  • 1 个回答
  • 18 Views
Martin Hope
elbarna
Asked: 2025-01-18 10:16:13 +0800 CST

Solaris 10 和 qemu:没有声音?

  • 5

我在 qemu 上有一个装有 Solaris 10 的虚拟机。我安装了 opensoundsystem 来播放声音,桌面上可以看到卡(查看音量图标)

在此处输入图片描述

Ossinfo 成绩单不错

ossinfo 
Version info: OSS 4.2 (b 2017/201702011242) (0x00040100) 
Platform: SunOS/i86pc 5.10 Generic_150401-55 (solaris10)

Number of audio devices:    1
Number of audio engines:    2
Number of MIDI devices:     0
Number of mixer devices:    1


Device objects
 0: osscore0 OSS common devices
 1: oss_sadasupport SADA compatibility layer
 2: oss_ich0 Intel ICH (2415) interrupts=5991 (11109)

MIDI devices (/dev/midi*)

Mixer devices
 0: ICH AC97 Mixer (STAC9700) (Mixer 0 of device object 2)

Audio devices
Intel ICH (2415)                  /dev/oss/oss_ich0/pcm0  (device index 0)

Nodes
  /dev/dsp -> /dev/oss/oss_ich0/pcm0
  /dev/dsp_in -> /dev/oss/oss_ich0/pcm0
  /dev/dsp_out -> /dev/oss/oss_ich0/pcm0
  /dev/dsp_ac3 -> /dev/oss/oss_ich0/pcm0
  /dev/dsp_multich -> /dev/oss/oss_ich0/pcm0
  /dev/mixer -> ../devices/pseudo/osscore@0:mixer
  /dev/sndstat -> ../devices/pseudo/osscore@0:sndstat

但当我想听 mp3 时,我什么也听不到,尽管程序似乎运行正常

mplayer Ace\ of\ base-The\ sign.mp3 
MPlayer 1.1-4.8.2 (C) 2000-2012 MPlayer Team

Playing Ace of base-The sign.mp3.
libavformat version 54.6.100 (internal)
Audio only file format detected.
Load subtitles in ./
==========================================================================
Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
AUDIO: 48000 Hz, 2 ch, s16le, 320.0 kbit/20.83% (ratio: 40000->192000)
Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)
==========================================================================
ao2: 48000 Hz  2 chans  s16le [0x9]

AO: [sun] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:   3.9 (03.9) of 198.0 (03:18.0)  0.8%    

音量似乎还行

在此处输入图片描述

有什么想法吗?

尝试连接 vmix 以启用多应用声音报告设备繁忙

vmixctl attach /dev/oss/oss_ich0/pcm0 
/dev/oss/oss_ich0/pcm0: Device busy

我甚至按照 archlinux wiki 的建议使用此选项配置驱动程序

vim /kernel/drv/osscore.conf

name="osscore" parent="pseudo" instance=0 ddi-no-autodetach=1 ddi-forceattach=1 vmix_no_autoattach=1

编辑 1:我还附加了虚拟混音(我必须暂时禁用 cde)。但仍然没有声音

在此处输入图片描述

solaris
  • 1 个回答
  • 11 Views
Martin Hope
elbarna
Asked: 2025-01-18 08:45:03 +0800 CST

Solaris 10 和 ipv6 仅 ping 内部网络

  • 5

在 Solaris10(qemu 上的虚拟机)上,我配置了 ipv6

ipsec 和防火墙已禁用

svcs -a|gegrep 'ipfilter|ipsec'
disabled        1:00:14 svc:/network/ipfilter:default
disabled       23:38:28 svc:/network/ipsec/manual-key:default
disabled        1:00:18 svc:/network/ipsec/policy:default
disabled        1:00:18 svc:/network/ipsec/ike:default

ipv6 已配置

ifconfig -a6
e1000g1: flags=2104841<UP,RUNNING,MULTICAST,DHCP,ROUTER,IPv6> mtu 1500 index 3
    inet6 fe80::5254:ee:fdc7:a479/10 
e1000g1:1: flags=2100841<UP,RUNNING,MULTICAST,ROUTER,IPv6> mtu 1500 index 3
    inet6 418:5b17:d32a:8023::2/64 

但无法 ping 通“外部”交换机(是由 libvirt 创建的 virbr),只能 ping 通自己的地址

ping -A inet6 -s 418:5b17:d32a:8023::2
PING 418:5b17:d32a:8023::2: 56 data bytes
64 bytes from 418:5b17:d32a:8023::2: icmp_seq=0. time=0.0300 ms
64 bytes from 418:5b17:d32a:8023::2: icmp_seq=1. time=0.0400 m

ping -A inet6 -s 418:5b17:d32a:8023::1
PING 418:5b17:d32a:8023::1: 56 data bytes

路线似乎正确

netstat -rn
Routing Table: IPv6
  Destination/Mask            Gateway                   Flags Ref   Use    If   
--------------------------- --------------------------- ----- --- ------- ----- 
418:5b17:d32a:8023::/64     418:5b17:d32a:8023::2       U       1      98 e1000g1:1 
fe80::/10                   fe80::5254:ee:fdc7:a479     U       1      69 e1000g1 

连接到同一虚拟交换机的另一台机器(Slackware Linux)可以 ping 通,没有任何问题

ping -6 fe80::5254:ee:fdc7:a481
PING fe80::5254:ee:fdc7:a481(fe80::5254:ee:fdc7:a481) 56 data bytes
64 bytes from fe80::5254:ee:fdc7:a481%eth0: icmp_seq=1 ttl=64 time=0.029 ms
64 bytes from fe80::5254:ee:fdc7:a481%eth0: icmp_seq=2 ttl=64 time=0.028 ms
64 bytes from fe80::5254:ee:fdc7:a481%eth0: icmp_seq=3 ttl=64 time=0.028 ms

为什么 Solaris 网络仍然处于孤立状态?

Routeadm 报告

routeadm 
              Configuration   Current              Current
                     Option   Configuration        System State
---------------------------------------------------------------
               IPv4 routing   enabled              enabled
               IPv6 routing   enabled              enabled
            IPv4 forwarding   enabled              enabled
            IPv6 forwarding   enabled              enabled

从外部机器我可以 ping Linux vm,但不能 ping Solaris vm。

solaris
  • 1 个回答
  • 7 Views
Martin Hope
elbarna
Asked: 2025-01-18 06:52:39 +0800 CST

Slackware 上 udev 的一个非常恼人的问题:有时启动时间超过 5 分钟

  • 5

有时在启动时我会读到这些消息

Jan 17 10:06:02 slack64 udevd[209]:  worker [219] /devices/pci0000:00/0000:00:08.1/0000:08:00.3/usb3/3-4/3-4.4/3-4.4:1.0/host8/target8:0:0/8:0:0:0/block/sr0 timeout; kill it
Jan 17 10:06:02 slack64 udevd[209]:  seq 1878 '/devices/pci0000:00/0000:00:08.1/0000:08:00.3/usb3/3-4/3-4.4/3-4.4:1.0/host8/target8:0:0/8:0:0:0/block/sr0' killed
Jan 17 10:06:46 slack64 udevd[209]:  worker [219] failed while handling '/devices/pci0000:00/0000:00:08.1/0000:08:00.3/usb3/3-4/3-4.4/3-4.4:1.0/host8/target8:0:0/8:0:0:0/block/sr0'

启动时卡住了,超过 5 分钟都无法启动。唯一的解决办法是:拔下我的 wifi 卡的 USB 线(使用 8852bu 驱动程序),启动后再重新连接(!)。

我的问题是:这个 USB 驱动程序如何干扰块设备?sr0 不是真正的驱动器,而是由包 vhba-module 创建的假驱动程序。

系统是Slackware 15.0,硬件并不重要,因为在三台不同的电脑上做同样的事情。

我试过这个方法,但是没有用。

wifi
  • 1 个回答
  • 22 Views
Martin Hope
elbarna
Asked: 2025-01-16 10:18:49 +0800 CST

如何使用 krb5 正确设置密码老化?

  • 7

我有一台 Solaris 服务器,它使用 ldap 进行用户身份验证,使用 kerberos 进行密码验证。用户可以更改密码,但我只遇到密码老化问题,例如:

passwd -r ldap -n 12 giovanni
Enter giovanni's password: 
Permission denied

这是 passwd 的 pam.conf

passwd  auth sufficient         pam_passwd_auth.so.1
passwd  auth required           pam_dhkeys.so.1
passwd  auth sufficient         pam_krb5.so.1
passwd  auth required           pam_unix_cred.so.1
passwd  auth required           pam_unix_auth.so.1

我知道在 kerberos 上可以使用策略,但如果我想为用户设置密码时效呢?我必须只为该用户设置策略吗?没有办法使用 passwd 命令吗?

solaris
  • 1 个回答
  • 77 Views
Martin Hope
elbarna
Asked: 2025-01-15 06:32:28 +0800 CST

Linux:串行端口极其缓慢

  • 5

我的 ttyS0 串行非常慢,几乎无法使用。

动态图

硬件是这样的

在此处输入图片描述

Slackware 15 上的内核是 5.15.161

主板是 A88XM-E/A88XM-E 带 coreboot

并且串行的设置是那些

console=ttyS1,115200 用于内核命令行,getty 115200

我也尝试过 19200,没有成功。有什么想法吗?

serial-port
  • 1 个回答
  • 34 Views
Martin Hope
elbarna
Asked: 2025-01-11 04:20:07 +0800 CST

PEOT EOM EOT 差异

  • 7

我对 Unix 中的磁带选项有点困惑

EOM (end of mark)

EOT (end of tape)

PEOT (physical end of tape)

据我了解

EOM 是最后一个文件的结尾,但我还有一些免费的磁带

EOT 是磁带的结尾,没有更多可用空间

PEOT 与 EOT 相同,对吗?

terminology
  • 1 个回答
  • 41 Views
Martin Hope
elbarna
Asked: 2025-01-07 04:45:56 +0800 CST

kadmin 的 ktadd 的“-glob”选项

  • 5

今天在研究 kerberos,用 ktadd 做测试时,发现了一个“神秘”的 -glob 选项。-glob 是什么意思?

我懂了..

Usage: ktadd [-k[eytab] keytab] [-q] [-e keysaltlist] [principal | -glob princ-exp] [...]

-k is the keytab where to extract keys
-q is quiet
-e is the ciphers/keysaltlist to use
-glob..global options?
kerberos
  • 1 个回答
  • 15 Views
Martin Hope
elbarna
Asked: 2025-01-03 07:14:36 +0800 CST

Openzfs、Linux 和 nfsv4 acl

  • 5

在 Linux 上,zfs 似乎支持 nfsv4acl

zfs set acltype=nfsv4 rpool/ROOT/nas
echo $?
0

我创建了一个 fs

zfs create -o mountpoint=/var/pub rpool/pub

并且...什么都没起作用

nfs4_setfacl -e /var/pub
Failed to instantiate ACL.

nfs4_setfacl -a A:fd:OWNER@:rwaDdxtTnNy,A:GROUP@:rwaDdxtTnNy,D:fd:EVERYONE@:rwaDdxtTnNy /var/pub
Failed to instantiate ACL.

我不知道还有其他任何实用程序可以管理 nfsv4acl。我错过了什么?

zfs 似乎已正确配置为使用 nfs4acl

rpool                      acltype                nfsv4                     local
rpool/ROOT                 acltype                nfsv4                     local
rpool/ROOT/nas             acltype                nfsv4                     local
rpool/ROOT/nas@26-12-2024  acltype                nfsv4                     inherited from rpool/ROOT/nas
rpool/pub                  acltype                nfsv4                     local
rpool/root                 acltype                nfsv4                     inherited from rpool
rpool/tmp                  acltype                nfsv4                     inherited from rpool

编辑:这个应用程序可能有效https://github.com/truenas/nfs4xdr-acl-tools问题是无法在 Slackware 15 上编译,所以我无法测试它

/usr/bin/libtool --mode=link gcc -o nfs4xdr_torture   nfs4xdr_torture.o   ../libnfs4acl/libnfs4acl.la -lattr  
libtool: link: gcc -o nfs4xdr_torture nfs4xdr_torture.o  ../libnfs4acl/.libs/libnfs4acl.a -lbsd -ljansson -lattr
/usr/bin/ld: ../libnfs4acl/.libs/libnfs4acl.a(nfs4_json_to_acl.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:54: multiple definition of `flags2txt'; ../libnfs4acl/.libs/libnfs4acl.a(nfs4_ace_to_json.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:54: first defined here
/usr/bin/ld: ../libnfs4acl/.libs/libnfs4acl.a(nfs4_json_to_acl.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:67: multiple definition of `perms2txt'; ../libnfs4acl/.libs/libnfs4acl.a(nfs4_ace_to_json.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:67: first defined here
/usr/bin/ld: ../libnfs4acl/.libs/libnfs4acl.a(nfs4_json_to_acl.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:87: multiple definition of `type2txt'; ../libnfs4acl/.libs/libnfs4acl.a(nfs4_ace_to_json.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:87: first defined here
/usr/bin/ld: ../libnfs4acl/.libs/libnfs4acl.a(nfs4_json_to_acl.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:98: multiple definition of `aclflags2txt'; ../libnfs4acl/.libs/libnfs4acl.a(nfs4_ace_to_json.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:98: first defined here
/usr/bin/ld: ../libnfs4acl/.libs/libnfs4acl.a(nfs4_json_to_acl.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:107: multiple definition of `basicperms2txt'; ../libnfs4acl/.libs/libnfs4acl.a(nfs4_ace_to_json.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:107: first defined here
/usr/bin/ld: ../libnfs4acl/.libs/libnfs4acl.a(nfs4_json_to_acl.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:117: multiple definition of `basicflags2txt'; ../libnfs4acl/.libs/libnfs4acl.a(nfs4_ace_to_json.o):/root/nfs4xdr-acl-tools/libnfs4acl/../include/nfs4_json.h:117: first defined here
collect2: error: ld returned 1 exit status
gmake[1]: *** [../include/buildrules:47: nfs4xdr_torture] Error 1
make: *** [Makefile:53: default] Error 2
zfs
  • 1 个回答
  • 27 Views
Martin Hope
elbarna
Asked: 2025-01-03 01:53:45 +0800 CST

Solaris zfs acl:如何强制“其他”acl 生效?

  • 5

使用此 acl

chmod A=owner@:wpdDxrarRsWwA:df:allow,group:nfs-users:wpdDxrarRsWwA:df:allow,everyone@:wpdDxrarRsWwA:df:deny /directory

我获得该目录仅供 nfs 用户和所有者使用,并且其中创建的所有文件和目录都有 770 权限。工作正常,但不再使用 nfs 挂载。哪个 acl 允许外部挂载?我尝试添加用户 root,但没有人

chmod A=owner@:wpdDxrarRsWwA:df:allow,group:nfs-users:wpdDxrarRsWwA:df:allow,everyone@:wpdDxrarRsWwA:df:deny,user:root:ww pdDxrarRsWwA:allow,user:nobody:wpdDxrarRsWwA:allow,group:nobody:wpdDxrarRsWwA:allow

但它不起作用,只有删除“everyone”行,目录才能通过 nfs 挂载。 不可能获得具有 770 继承权限并同时可通过 nfs 挂载的目录吗?

服务器是Solaris,客户端是Linux。

nfs
  • 1 个回答
  • 15 Views
Martin Hope
elbarna
Asked: 2024-12-31 03:20:45 +0800 CST

如何知道 pkcs12 格式的 ike 的 Solaris ipsec 密钥?

  • 5

我想将 Solaris ipsec ike 密钥转换为适合 Libreswan 的格式。

使用命令 ikecert 我导出公钥

ikecert certdb -e 0 > public.pem 

和私钥

ikecert certlocal -e 0 > public.pem 

现在使用 openssl 我尝试以 pkcs12 格式进行转换...

openssl pkcs12 -export -in chiavepubblica.pem -inkey chiaveprivata.pem -out YourName.p12

返回此错误

4274747236:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:707:Expecting: ANY PRIVATE KEY

有人知道将其导出或转换为适合 libreswan 的格式的方法吗?谢谢

solaris
  • 1 个回答
  • 11 Views
Martin Hope
elbarna
Asked: 2024-12-29 18:03:00 +0800 CST

为什么“od”会引入前导零?

  • 4

使用 Solaris 10 ipsec 时,必须将密钥转换为十六进制格式。因此,我需要一个命令来将文本转换为十六进制。

这条线工作正常

echo "mypassword" | od -t x1|head -1|tr -d ' ' |tr [a-z] [A-Z]

生产

00000006D7970617373776F72640A

无论如何使用在线转换器它会返回这个

6D7970617373776F72640A

作为一种解决方法我使用这个

echo "mypassword" | od -t x1|head -1|tr -d ' ' |cut -c 8-1000|tr [a-z] [A-Z]

它返回

6D7970617373776F72640A

问题是..为什么 od 返回那些 00000000?

hex
  • 1 个回答
  • 50 Views
Martin Hope
elbarna
Asked: 2024-12-26 16:18:14 +0800 CST

Kerberos kdc,如何在 Solaris 上强制生成 AES 密钥?

  • 5

我想避免在 Solaris kdc 上使用旧的弱密码,只使​​用 AES。我已编辑 kdc.conf

   master_key_type = aes256-cts-hmac-sha1-96
   supported_enctypes = aes256-cts-hmac-sha1-96:normal aes128-cts-hmac-sha1-96:normal

这些是 krb5.conf 的行

default_tgs_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96
default_tkt_enctypes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96
permitted_encryptes = aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96

重新启动 kdc 和 kadmin 然后..

kadmin -p kws/admin -wmypassword
Authenticating as principal kws/admin with password.
kadmin:  

addprinc NFS/[email protected]

ktadd -k nfs.keytab -e aes256-cts-hmac-sha1-96  NFS/[email protected]
ktadd: Invalid argument while parsing keysalts aes256-cts-hmac-sha1-96

尝试默认..

ktadd -k nfs.keytab NFS/[email protected]
Entry for principal NFS/[email protected] with kvno 3, encryption type AES-256 CTS mode with 96-bit SHA-1 HMAC added to keytab WRFILE:nfs.keytab.
Entry for principal NFS/[email protected] with kvno 3, encryption type AES-128 CTS mode with 96-bit SHA-1 HMAC added to keytab WRFILE:nfs.keytab.
Entry for principal NFS/[email protected] with kvno 3, encryption type Triple DES cbc mode with HMAC/sha1 added to keytab WRFILE:nfs.keytab.
Entry for principal NFS/[email protected] with kvno 3, encryption type ArcFour with HMAC/md5 added to keytab WRFILE:nfs.keytab.
Entry for principal NFS/[email protected] with kvno 3, encryption type DES cbc mode with RSA-MD5 added to keytab WRFILE:nfs.keytab.

为什么要生成 des 密钥?是否可以强制使用 AES 密码?

编辑:我找到了一种仅创建 aes256keys 的方法

ktadd -e aes256-cts:normal -k nfs.keytab NFS/[email protected]

问题仍然是找到一种强制/生成仅 aes256 密钥的方法。

solaris
  • 1 个回答
  • 12 Views

Sidebar

Stats

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

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve