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

ron's questions

Martin Hope
ron
Asked: 2025-01-16 00:03:25 +0800 CST

在 RHEL 9 中获取详细的启动画面

  • 5

在 RHEL 7 和 8 中我一直这样做:

  • /etc/default/grub
    • GRUB_CMDLINE_LINUX=... verbose并移除rhgb quiet然后执行
    • grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

这不会对 RHEL 9 产生影响。现在在 RHEL 9 中执行此操作的正确方法是什么?

我注意到grub.cfg现在位于/boot/RHEL,并且我尝试了-o选项中的该位置但仍然不起作用。

rhel
  • 1 个回答
  • 27 Views
Martin Hope
ron
Asked: 2025-01-15 21:31:37 +0800 CST

如何退出“screen /dev/ttyUSB0 115200”

  • 5

使用 USB 转串行电缆,我可以通过以下方式成功连接到一台设备screen /dev/ttyUSB0 115200

屏幕内是否有命令可以关闭并返回我的终端提示?这是在 RHEL-8.10 中。 并且ctrl-d没有影响。ctrl-cctrl-z

gnu-screen
  • 2 个回答
  • 29 Views
Martin Hope
ron
Asked: 2024-08-27 23:54:46 +0800 CST

setuid 无法与 C 代码和 system() 调用一起使用

  • 5

我在 RHEL-8.10 中安装了 NICE-DCV,并以 root 身份执行dcv list-sessions 显示系统上的所有会话。但如果用户执行dcv list-sessions此操作,则输出仅是他们的会话,不会报告任何其他会话;这是正常的。

在编写 C 代码以让列表会话输出更美观,并允许所有用户查看当前有哪些活动会话时,我尝试在我的c 可执行文件上设置 UID/usr/local/bin/dcvlist,结果显示为-rwsrwxr-x. 1 root root dcvlist。当我以 root 身份运行此dcvlist可执行文件时,我得到了所有会话正在发生的预期输出,但作为普通用户帐户,仍然没有发生这种情况。

根据我所解释的内容,我做错了什么吗?我是否误以为 setuid 也应该适用于system("dcv list-sessions")我的 C 代码中的,但事实似乎并非如此?我所有的 C 代码都在做system("dcv list-sessions")...实际上是 a popen,然后我只是重新打印该输出。

此外,该dcv程序还需要许多参数,list-sessions所以我不想允许sudo用户以 root 身份运行该程序。

c
  • 1 个回答
  • 25 Views
Martin Hope
ron
Asked: 2024-08-07 01:24:58 +0800 CST

SAMBA 密码过期

  • 6
  • 具体为 RHEL-8.10
  • 桑巴-4.19
  • security = user在 /etc/samba/smb.conf [全局]
  • passdb backend = tdbsam在 /etc/samba/smb.conf [全局]

smbpasswd -a <user>这样做是为了有一个用于 Samba 连接的独立密码。

当 Linux 用户的密码/etc/passwd过期时,是否有办法让该用户的 Samba 密码也过期?当 Linux 帐户密码过期时,至少禁止该用户的 Samba 连接?

场景:/etc/passwd 密码设置为在 90 天后过期,如PASS_MAX_DAYS和/etc/login.defs所示passwd -S <user>。当用户使用时间超过 90 天,更改其 Linux 密码的时间已到,他们实际上已被锁定在 Linux 之外时,我观察到(使用测试帐户)Samba 仍然可以访问共享文件夹,因为他们的 WindowsNT 密码处于不同的过期周期,并且他们仍然可以访问 Linux 服务器的 Samba 共享。/etc/passwd如果可能,我希望过期时间也能使 Linux 服务器上的 Samba 密码过期。理想情况下,PASS_MAX_DAYS也将其应用于 Samba 密码并强制用户更新,这可能吗?这是目前 /etc/passwd 密码的基本内容,但似乎 Samba 在这方面出现了漏洞。

password
  • 1 个回答
  • 21 Views
Martin Hope
ron
Asked: 2024-07-19 03:53:41 +0800 CST

tcsh 仅将 stderr 管道化为 null,而将 stdout 保留原样

  • 5

tcsh在 RHEL-8.10 中运行。

做了之后grep -l <something> *我得到了很多Is a directory回应。

在 bash 中我会 grep -l <something> * 2>/dev/null抑制这一点。

tcsh 中的等效语法是什么?

io-redirection
  • 1 个回答
  • 10 Views
Martin Hope
ron
Asked: 2024-06-24 09:24:51 +0800 CST

编写将消息注入 /var/log/messages 的 C 代码的正确方法是什么?

  • 23

在 Linux 中,如果有必要,RHEL-8.10 或更高版本,我想编写一些 C 代码,这些代码接受各种参数,并在特定条件下发出system("init 0")关闭系统命令。在发出关闭命令之前,我想在其中放入一行消息,/var/log/messages说明系统被 ron 的代码关闭,这样我就可以记录关闭的时间。

如何正确写入/var/log/messages?

显然我可以做一个fopen("/var/log/messages, "a")和一个简单的fprintf,但这看起来有点像黑客行为。

logs
  • 1 个回答
  • 2636 Views
Martin Hope
ron
Asked: 2024-06-17 21:23:41 +0800 CST

更改 /run/media/root/ 分区的 uuid

  • 8

我有一个 USB 磁盘,格式化后它显示为/run/media/root/abc213abc123 ,这是一个更长更复杂的字符串,普通人不可能记住......这是您在 中看到的 UUID 的典型特征/etc/fstab。

在我将该分区格式化为 XFS 后,是否有办法更改我的 USB 磁盘上的此 uuid 字符串?这样我就可以将其 UUID 设置为单个字符,如果可以,该怎么做?

partition
  • 1 个回答
  • 155 Views
Martin Hope
ron
Asked: 2024-06-13 21:27:42 +0800 CST

创建具有 GPT 分区方案的可启动 USB,以使用 Linux .iso

  • 4

要安装的磁盘大小为 14GB。例如,rhel-8.10-x86_64-dvd.iso对于在 Linux 中显示为/dev/sdbcp rhel-8.10-x86_64-dvd.iso /dev/sdb的 USB 设备(即磁盘),执行此 操作将在该 USB 设备上生成一个msdos分区方案,该方案可启动并允许您安装 Linux。

我怀疑他们使用 msdos 分区方案来维持 EFI 之前的旧硬件的功能

msdos 分区方案有 2TB 的限制,当我有一个 4+ TB 的 USB 磁盘时,我会想要同时使用它来安装 Linux(需要设备上的 < 15GB 空间)并且还可以使用设备剩余的 4+ TB,而不仅限于 2TB 的 msdos 分区,这会带来不便。

因此,解决方案似乎是用 GUID 分区表(即GPT )格式化 4+ TB USB 设备,我可以在其上创建一个 4+ TB XFS 分区,同时还可以将内容从解压文件转换或传输rhel-8.10-x86_64-dvd.iso到 GPT 格式的设备...然后将包含来自 iso 的 Linux 安装内容的那个(iso9660?)分区标记为可启动?

解压后的内容rhel-8.10-x86_64-dvd.iso为

<folder>   [BOOT]
<folder>   AppStream
<folder>   BaseOS
<folder>   EFI
<folder>   images
<folder>   isolinux
           .discinfo
           .treeinfo
           EULA
           extra_files.json
           GPL
           media.repo
           RPM-GPG-KEY-redhat-beta
           RPM-GPG-KEY-redhat-release
           TRANS.TBL

有没有办法按照我描述的方法手动执行 Linux 操作,使 USB 设备可启动(使用parted或fdisk或其他)?如果有,该怎么做?或者有没有办法使用 Microsoft Windows 下的一些免费软件?

partition
  • 1 个回答
  • 38 Views
Martin Hope
ron
Asked: 2024-06-05 23:38:14 +0800 CST

将分区和数据添加到已经具有可启动 iso9660 的 USB 驱动器上

  • 5

我有一个 USB 记忆棒(实际上是一个磁盘),其大小为 5TB。

我cp rhel-8.10-x86_64-dvd.iso /dev/sde对其进行了操作,然后它可以启动并安装 Redhat Linux。

我想做的是将其他各种数据复制到此磁盘,但保留可启动的 rhel-8.10 安装功能。这可能吗?

将 rhel iso 复制到其中后lsblk显示

SIZE    FSTYPE     NAME
4.6T    iso9660    /dev/sde
13.3G   iso9660    /dev/sde1
 9.5M   vfat       /dev/sde2

有没有办法添加 XFS 分区,使其能够被/dev/sde3挂载以利用剩余的 4+ TB 空间,同时仍然保持安装 rhel 的可启动功能?

partition
  • 1 个回答
  • 25 Views
Martin Hope
ron
Asked: 2024-05-15 22:11:03 +0800 CST

帮助 bash 脚本将 [grep sed cut] smartctl 输出转换为所需格式

  • 5

如果有人擅长编写 bash 脚本,并且倾向于执行以下操作,我希望实现这一目标:

我不擅长编写 bash,更不擅长使用 cut 或 sed,如果这可以在 bash 中用最少的行数来完成,我宁愿这样做而不是编写 C 程序

  smartctl --scan

  /dev/sda -d scsi # /dev/sda, SCSI device
  /dev/sdb -d scsi # /dev/sdb, SCSI device
  /dev/bus/0 -d megaraid,0 # /dev/bus/0 [megaraid_disk_00], SCSI device
  /dev/bus/0 -d megaraid,1 # /dev/bus/0 [megaraid_disk_01], SCSI device
  /dev/bus/0 -d megaraid,2 # /dev/bus/0 [megaraid_disk_02], SCSI device
  /dev/bus/0 -d megaraid,3 # /dev/bus/0 [megaraid_disk_03], SCSI device
  /dev/bus/0 -d megaraid,4 # /dev/bus/0 [megaraid_disk_04], SCSI device
  /dev/bus/0 -d megaraid,5 # /dev/bus/0 [megaraid_disk_05], SCSI device
  /dev/bus/0 -d megaraid,6 # /dev/bus/0 [megaraid_disk_06], SCSI device
  /dev/bus/0 -d megaraid,7 # /dev/bus/0 [megaraid_disk_07], SCSI device

  # 'sdb' not important just always used 'sda' for the following
  # for m = 0 to n per the --scan output giving 0..7 do
  #   smartctl -a -d megaraid,m /dev/sda | grep/sed/cut XXX
  #   where the XXX results in just   `KPM5WRUG3T84 12345678a` being extracted
  #   from the smartctl -a output being this:
  # end for m

=== START OF INFORMATION SECTION ===
Product:              KPM5WRUG3T84
User Capacity:        3,840,755,982,336 bytes [3.84 TB]
Logical block size:   512 bytes
Physical block size:  4096 bytes
LU is resource provisioned, LBPRZ=1
Rotation Rate:        Solid State Device
Form Factor:          2.5 inches
Serial number:        12345678a

因此,对于我的 8 个磁盘,我希望从脚本中获取此格式化输出,以便我可以轻松地在 Excel 中打开;这是用于磁盘库存

0 KPM5WRUG3T84  12345678a
1 KPM5WRUG3T84  12345678b
2 KPM5WRUG3T84  12345678c
3 KPM5WRUG3T84  12345678d
4 KPM5WRUG3T84  12345678d
5 KPM5WRUG3T84  12345678e
6 KPM5WRUG3T84  12345678f
7 KPM5WRUG3T84  12345678g

更新:这是我根据下面斯蒂芬·基特的回答编写的 bash,谢谢。

#!/bin/bash

N=`smartctl --scan | grep megaraid | wc -l`

for (( m = 0; m < N; m++ )); do

 echo "$m" $(smartctl -a -d "megaraid,$m" /dev/sda | grep -E '(^Product:|^Serial number:)' | cut -d: -f2)

# this one prints # manuf model serial
# smartctl -a -d "megaraid,$m" /dev/sda -json | jq -r "\"$m \" + .model_name + \" \" + .serial_number"

done
bash
  • 3 个回答
  • 51 Views
Martin Hope
ron
Asked: 2024-04-11 22:51:07 +0800 CST

除了 tar 之外,Linux 中适用于 Windows 的容器选项

  • 5

我的 Windows 10 电脑没有安装 winzip 或 7zip 或任何类型的压缩软件。

不要问为什么

因此,windows10 电脑只能执行unzip. 他们无法处理.tar文件。

我有一个data/10+ GB 的文件夹;在 RHEL-8.9 中执行 azip -r需要太长时间(而且我不知道它是否也在尝试压缩许多无法压缩的文件)。

Linux 中有哪些方法可以对文件夹(除 tar 之外)进行容器化以模拟零压缩的 .tar,以便将其传输到 U 盘并通过网络进行简单的单文件操作,然后也可以在 Windows 10/11 中使用Windows 哪里没有安装第 3 方压缩软件(图中 Windows 是从 win10.iso 全新安装的,仅此而已)?

如果zip是最好的方法,那么根据上述描述,Linux 中有哪些选项?

windows
  • 2 个回答
  • 31 Views
Martin Hope
ron
Asked: 2024-02-16 04:31:33 +0800 CST

usbguard规则允许任何键盘和鼠标

  • 5

这是一个/etc/usbguard/rules.conf文件,是通过生成的usbguard generate-policy > /etc/usbguard/rules.conf

这是在 Dell optiplex 电脑上,仅连接了有线键盘和有线鼠标,RHEL-8.9和usbguard-1.0.0-13.el8.x86_64

allow id 1d6b:0002 serial "0000:00:1d.0" name "EHCI Host Controller" hash "WHBTxNaEoMGNSNc31KpFNSAeFF4HbLMQgSBqORlC6S8=" parent-hash "jW2YTPWRLeQOE7Q8I2f0pdN13zFYXVQGQoNmr1gDZgg=" with-interface 09:00:00 with-connect-type ""
allow id 1d6b:0002 serial "0000:00:14.0" name "xHCI Host Controller" hash "jEP/6WzviqdJ5VSeTUY8PatCNBKeaREvo2OqdplND/o=" parent-hash "rV9bfLq7c2eA4tYjVjwO4bxhm+y6GgZpl9J60L0fBkY=" with-interface 09:00:00 with-connect-type ""
allow id 1d6b:0002 serial "0000:00:1a.0" name "EHCI Host Controller" hash "ej1WVedyLyUMLiQxzEcrwbY45zCodwV85Kzy7hm2Gv4=" parent-hash "e/RW0mMbM+TSFQxpRiMEfL7/3RJfKVdqffBm9F5qA+E=" with-interface 09:00:00 with-connect-type ""
allow id 1d6b:0003 serial "0000:00:14.0" name "xHCI Host Controller" hash "3Wo3XWDgen1hD5xM3PSNl3P98kLp1RUTgGQ5HSxtf8k=" parent-hash "rV9bfLq7c2eA4tYjVjwO4bxhm+y6GgZpl9J60L0fBkY=" with-interface 09:00:00 with-connect-type ""
allow id 8087:0024 serial "" name "" hash "Zx7v0FMQEjScKSAFENAiobEs1OGPPB0YWR+yXDCVE04=" parent-hash "WHBTxNaEoMGNSNc31KpFNSAeFF4HbLMQgSBqORlC6S8=" via-port "1-1" with-interface 09:00:00 with-connect-type "hardwired"

allow id 0461:4d51 serial "" name "DELL Laser Mouse" hash "w2bwgTsGy6TVhOOr7smHrvF8PtmYVKQwxbqgA5betmI=" parent-hash "jEP/6WzviqdJ5VSeTUY8PatCNBKeaREvo2OqdplND/o=" via-port "2-3" with-interface 03:01:02 with-connect-type "hotplug"
allow id 413c:2003 serial "" name "Dell USB Keyboard" hash "3eEGsGE566EIofQwRf06EINoPRynZIa/09c3uyy4TTY=" parent-hash "jEP/6WzviqdJ5VSeTUY8PatCNBKeaREvo2OqdplND/o=" via-port "2-4" with-interface 03:01:01 with-connect-type "hotplug"

allow id 8087:0024 serial "" name "" hash "kv3v2+rnq9QvYI3/HbJ1EV9vdujZ0aVCQ/CGBYIkEB0=" parent-hash "ej1WVedyLyUMLiQxzEcrwbY45zCodwV85Kzy7hm2Gv4=" via-port "3-1" with-interface 09:00:00 with-connect-type "hardwired"

allow id 0461:4d22 serial "" name "USB Optical Mouse" hash "OZ6XJQmjdeDg7Dp2MelZt+ewNTtdNTt92FtGPI0VPAc=" parent-hash "kv3v2+rnq9QvYI3/HbJ1EV9vdujZ0aVCQ/CGBYIkEB0=" via-port "3-1.4" with-interface 03:01:02 with-connect-type "hotplug"

如果规则文件中没有最后一行,第二个鼠标在插入时将无法工作,所以我知道这个规则文件是特定于键盘和鼠标的。

我的问题是 - 我被告知这是可能的 - 如何编写规则语法以允许任何键盘和任何鼠标连接到系统的[到任何 USB 端口]?

额外问题:如果将有线 USB kybd 和鼠标插入具有 USB 端口的显示器,那么您有一根 USB 电缆从该显示器连接到计算机 USB 端口,是否可以将其列入白名单以允许任何显示器?

usbguard
  • 1 个回答
  • 32 Views
Martin Hope
ron
Asked: 2024-02-15 03:33:48 +0800 CST

如何查找未欺骗的网卡MAC地址

  • 11

在 Red Hat Enterprise Linux (RHEL) 8 中,如果有人这样做ifconfig eth0 hw ether abcd12341234,

我所知道ifconfig的是ip -a,

那么有没有一种方法可以可靠地获取 eth0 接口的真实 MAC 地址,如果可以的话如何获取?...除了重新启动到来自可靠来源的 Linux Live CD 以外,以确保接口的 MAC 地址没有更改。

network-interface
  • 3 个回答
  • 1730 Views
Martin Hope
ron
Asked: 2023-10-04 04:45:33 +0800 CST

linux将mp3立体声转换为单声道的方法?

  • 5

我知道如何在 microsoft windows 中使用 Audacity 将 mp3 音频文件从立体声转换为单声道,但如果您想做很多事情,只需点击几下鼠标,而且很耗时。

Linux 中是否有一个程序提供了一种方法,使我可以批量编写命令脚本来转换包含 1000 个 mp3 文件的文件夹?例如 :

some_sound_program.x  --convert-stereo-to-mono  --input file1.mp3  --output file1_mono.mp3
some_sound_program.x  --convert-stereo-to-mono  --input file2.mp3  --output file2_mono.mp3
{and so on}
audio
  • 1 个回答
  • 22 Views
Martin Hope
ron
Asked: 2023-08-09 05:04:56 +0800 CST

RHEL 8 nfs-utils-2.3 是否支持 NFS proto=udp?

  • 5

我可以vers=3发生,我可以mountproto=udp发生,但我无法proto=udp在 nfs 客户端上发生。我只能proto=tcp上nfs客户端。

proto=udpRHEL 8.8 中的 nfs-utils 2.3.3 支持吗?

这是原来的conf文件,proto=udp在nfs客户端上可以改变什么来实现?

无论我如何改变其他任何东西,设置都会tcp=n导致nfs.conf失败。service nfs-server start

# /etc/nfs.conf
# This is a general configuration for the
# NFS daemons and tools
#
[general]
# pipefs-directory=/var/lib/nfs/rpc_pipefs
#
[nfsrahead]
# nfs=15000
# nfs4=16000
#
[exportfs]
# debug=0
#
[gssd]
# verbosity=0
# rpc-verbosity=0
# use-memcache=0
# use-machine-creds=1
use-gss-proxy=1
# avoid-dns=1
# limit-to-legacy-enctypes=0
# context-timeout=0
# rpc-timeout=5
# keytab-file=/etc/krb5.keytab
# cred-cache-directory=
# preferred-realm=
# set-home=1
# upcall-timeout=30
# cancel-timed-out-upcalls=0
#
[lockd]
# port=0
# udp-port=0
#
[mountd]
# debug=0
# manage-gids=n
# descriptors=0
# port=0
# threads=1
# reverse-lookup=n
# state-directory-path=/var/lib/nfs
# ha-callout=
# cache-use-ipaddr=n
# ttl=1800
#
[nfsdcld]
# debug=0
# storagedir=/var/lib/nfs/nfsdcld
#
[nfsdcltrack]
# debug=0
# storagedir=/var/lib/nfs/nfsdcltrack
#
[nfsd]
# debug=0
# threads=8
# host=
# port=0
# grace-time=90
# lease-time=90
# tcp=y
# vers2=n
# vers3=y
# vers4=y
# vers4.0=y
# vers4.1=y
# vers4.2=y
# rdma=n
# rdma-port=20049
#
[statd]
# debug=0
# port=0
# outgoing-port=0
# name=
# state-directory-path=/var/lib/nfs/statd
# ha-callout=
# no-notify=0
#
[sm-notify]
# debug=0
# force=0
# retry-time=900
# outgoing-port=
# outgoing-addr=
# lift-grace=y
#

#
# /etc/nfsmount.conf - see nfsmount.conf(5) for details
#
# This is an NFS mount configuration file. This file can be broken
# up into three different sections: Mount, Server and Global
# 
# [ MountPoint "Mount_point" ] 
# This section defines all the mount options that
# should be used on a particular mount point. The '<Mount_Point>'
# string need to be an exact match of the path in the mount 
# command. Example:
#     [ MountPoint "/export/home" ]
#       background=True
# Would cause all mount to /export/home would be done in
# the background
#
# [ Server "Server_Name" ]
# This section defines all the mount options that
# should be used on mounts to a particular NFS server. 
# Example:
#     [ Server "nfsserver.foo.com" ]
#       rsize=32k
#       wsize=32k
# All reads and writes to the 'nfsserver.foo.com' server 
# will be done with 32k (32768 bytes) block sizes.
#
[ NFSMount_Global_Options ]
# This statically named section defines global mount 
# options that can be applied on all NFS mount.
#
# Protocol Version [2,3,4]
# This defines the default protocol version which will
# be used to start the negotiation with the server.
# Defaultvers=4
#
# Setting this option makes it mandatory the server supports the
# given version. The mount will fail if the given version is 
# not support by the server. 
# Nfsvers=4
#
# Network Protocol [udp,tcp,rdma] (Note: values are case sensitive)
# This defines the default network protocol which will
# be used to start the negotiation with the server.
# Defaultproto=tcp
#
# Setting this option makes it mandatory the server supports the
# given network protocol. The mount will fail if the given network
# protocol is not supported by the server.
# Proto=tcp
#
# The number of times a request will be retired before 
# generating a timeout 
# Retrans=2
#
# The number of minutes that will retry mount
# Retry=2
#
# The minimum time (in seconds) file attributes are cached
# acregmin=30
#
# The Maximum time (in seconds) file attributes are cached
# acregmin=60
#
# The minimum time (in seconds) directory attributes are cached
# acregmin=30
#
# The Maximum time (in seconds) directory attributes are cached
# acregmin=60
#
# Enable Access  Control  Lists
# Acl=False
#
# Enable Attribute Caching
# Ac=True
#
# Do mounts in background (i.e. asynchronously)
# Background=False
#
# Close-To-Open cache coherence
# Cto=True
#
# Do mounts in foreground (i.e. synchronously)
# Foreground=True
#
# How to handle times out from servers (Hard is STRONGLY suggested)
# Hard=True
# Soft=False
#
# Enable File Locking
# Lock=True
#
# Enable READDIRPLUS on NFS version 3 mounts
# Rdirplus=True
#
# Maximum Read Size (in Bytes)
# Rsize=8k
#
# Maximum Write Size (in Bytes)
# Wsize=8k
#
# Maximum Server Block Size (in Bytes)
# Bsize=8k
#
# Ignore unknown mount options
# Sloppy=False
#
# Share Data and Attribute Caches
# Sharecache=True
#
# The amount of time, in tenths of a seconds, the client
# will wait for a response from the server before retransmitting
# the request.
# Timeo=600
#
# Sets all attributes times to the same time (in seconds)
# actimeo=30
#
# Server Mountd port mountport
# mountport=4001
#
# Server Mountd Protocol
# mountproto=tcp
#
# Server Mountd Version
# mountvers=3
#
# Server Mountd Host
# mounthost=hostname
#
# Server Port
# Port=2049
#
# RPCGSS security flavors 
# [none, sys, krb5, krb5i, krb5p ]
# Sec=sys
#
# Allow Signals to interrupt file operations
# Intr=True
#
# Specifies  how the kernel manages its cache of directory
# Lookupcache=all|none|pos|positive
#
# Turn of the caching of that access time
# noatime=True
rhel
  • 1 个回答
  • 15 Views
Martin Hope
ron
Asked: 2023-08-08 22:33:59 +0800 CST

NFS proto 和 mountproto 的区别

  • 7

在 RHEL 8.8 中,当我尝试测试 NFS tcp 与 udp 以及版本 3 与 4.0、4.1 和 4.2 时,mountproto=除了proto=键入mount. 这有什么意义和意义呢?

在 RHEL 8.8 中,我是否可以在 nfs 客户端上vers=3专门显示 NFS 操作?proto=udp

proto=tcp在 nfs 客户端上,当我看到和时,这意味着什么mountproto=udp?

rhel
  • 2 个回答
  • 264 Views
Martin Hope
ron
Asked: 2023-07-20 23:49:49 +0800 CST

RHEL 8 在 fstab 中引导缺少磁盘时挂起

  • 5

我的/etc/fstab

UUID=12345abcdef   /data  xfs   defaults  0  0

我认为0 0部分(其中之一)意味着跳过磁盘检查,因此在启动过程中如果磁盘不存在,操作系统会接受它并继续。

在 RHEL 8.8 中,我有该条目/etc/fstab,但我已将该磁盘手动从系统中删除。Redhat 首先让 systemd等待1 分 30 秒,然后按下Ctrl-D 进行维护或输入 root 密码。

我输入 root 密码,注释掉该条目/etc/fstab并重新启动,一切都很好。

有没有办法配置 RHEL-8,使其不会暂停 1 分 30 秒,也不会进入维护阶段?能否只打印一条启动信息,完成启动,不延迟超过2秒?

rhel
  • 1 个回答
  • 18 Views
Martin Hope
ron
Asked: 2023-02-02 12:40:08 +0800 CST

tuned 如何存储要运行的活动配置文件

  • 5

在 RHEL 7.9 中,特别是如果重要的话,做

systemctl enable tuned --now

tuned-adm profile hpc-compute

默认配置文件是throughput-performance。

我有一个虚拟文件系统,chroot用于引导集群系统的无盘节点。启用调整后的服务有效,但是在 chrooted 文件系统中使用--now或执行服务启动服务service tuned start失败,这是有道理的。但我知道如何更改配置文件的唯一方法是通过上面的命令,该命令也无法说明调整后的服务未运行。先有鸡还是先有蛋的问题。

我不想让我的无盘计算节点启动,然后每次都必须 ssh 并tuned-adm profile hpc-compute更改配置文件。

哪里有文件,tuned-adm profile命令更改,我可以手动编辑,它说defaultprofile = X?这样我就可以修改我的虚拟文件系统,以便以我想要的配置文件开始调整。

澄清一下——我从tuned-adm profile <whatever>chroot 文件系统下得到的警告并不意味着它没有将它设置为新的配置文件。它确实有效。但根据我最初的问题,我仍然想知道 tuned 是否修改了某些 .conf 文件或其他地方,它以纯文本形式说明服务启动时配置文件的内容。

tuned
  • 1 个回答
  • 12 Views
Martin Hope
ron
Asked: 2022-12-01 09:46:40 +0800 CST

yum 找到依赖 rpm 的父级

  • 5

运行 RHEL 7.9。我已经tomcat-servlet-3.0-api-7.0.76-16.el7_9.noarch通过一个出现rpm -qa

我如何使用yum或其他任何东西来找到为什么我安装了那个 tomcat-servlet 以及哪些 rpm 正在使用它作为依赖项?

我想知道tomcat-servlet-3.0-api-7.0.76-16.el7_9.noarch首先是如何或为什么安装的,因为我知道我没有明确安装它。

yum
  • 1 个回答
  • 14 Views
Martin Hope
ron
Asked: 2022-11-02 08:52:30 +0800 CST

更改组所有权,为整个文件系统指定从到

  • 5

我有 3 个特定的用户帐户(无论如何少于 10 个),对于特定/data或/home目录下的所有文件和文件夹,我只想更改这些特定用户的所有出现的文件/文件夹的组所有权。

我不知道到处可能在哪里(除了/homeand /data),所以我想做一个<what?> -Ron /。有没有办法做到这一点?现有组已命名XYZ,我想将所有文件和文件夹更改ron.XYZ为ron.users. 怎么可能呢?

permissions
  • 1 个回答
  • 14 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