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

Jorge Suárez de Lis's questions

Martin Hope
Jorge Suárez de Lis
Asked: 2013-01-19 01:42:33 +0800 CST

扫描网络上连接的、开机的计算机?

  • 4

我想扫描 LAN 上已开机的计算机并收集相关日志。我试过nmap了,但效果不是很好(很多开机的电脑都没有被检测到)。

nmap -sP 192.168.2.0/24
Nmap done: 256 IP addresses (10 hosts up) scanned in 6.07 seconds

我还考虑过查看 IP 的网络 TCP 数据包,但我不知道有任何工具可以做到这一点。

在这个网络上,所有的计算机都有关联的静态IP,因此一个IP标识一台计算机。这些 PC 具有不同的操作系统(Windows 7、Ubuntu 10.04、Ubuntu 12.04 等)。

我最好的机会是什么?

linux
  • 6 个回答
  • 4835 Views
Martin Hope
Jorge Suárez de Lis
Asked: 2013-01-16 00:39:58 +0800 CST

将来宾从 KVM 迁移到 VirtualBox

  • 1

在我们构建新的虚拟化环境时,我正在将一些机器从 KVM 迁移到 VirtualBox 以过渡一段时间。

现在的问题是,磁盘位于 LVM 分区上,我必须将它们转换为 VirtualBox 可识别的格式。我在另一个方向上找到了很多关于过渡的文档,但在这个方向上没有。

qemu-img convert -c /dev/Volume01/Disk -O qcow2 Disk.qcow2

该工具似乎可以正常工作,但磁盘无法正常工作。在 VirtualBox 上,我得到FATAL: No bootable medium found! System halted.. 还有其他选择吗?

linux
  • 2 个回答
  • 2730 Views
Martin Hope
Jorge Suárez de Lis
Asked: 2012-11-23 05:32:06 +0800 CST

Cloudstack 虚拟机在不同主机上时无法与虚拟路由器通信

  • 0

我在一组 Ubuntu 10.04 主机上使用 Cloudstack 2.2.14,我的设置有问题。

我有两个主机在运行。当在主机 1 上创建虚拟路由器并在主机 2 上创建使用该虚拟路由器的虚拟机时,反之亦然,我在虚拟机上根本没有连接。

首先,我必须在该虚拟机上手动设置网络 - 通常 DHCP 正在工作,但不是在这里 -。然后,我无法从虚拟机 ping 到虚拟路由器,反之亦然。

当虚拟路由器和虚拟机都在同一台主机上创建时,一切正常!

也许这些包裹正在以某种方式被过滤?我不知道如何进行。两台主机都可以在虚拟化之外直接通信。

networking
  • 2 个回答
  • 1509 Views
Martin Hope
Jorge Suárez de Lis
Asked: 2012-09-26 15:15:49 +0800 CST

如何在不受信任的客户端环境中保护 NFS

  • 4

如果我理解它是如何工作的,那么 NFS 安全性依赖于客户端可以信任的事实。

我担心某些用户会访问其他用户的文件。是的,root_squash选项避免客户端上的 root 用户访问文件,但如果某人在任何客户端上具有 root 权限,他可以 su 进入任何用户,然后访问他们想要的文件。

我目前正在将文件导出到所有本地网络。我正在考虑仅导出到受信任客户端的网络组——但维护起来可能会很痛苦,而且它只会稍微掩盖问题,如果某些受信任的客户端获得 root 访问权限,问题仍然存在。

linux
  • 1 个回答
  • 1323 Views
Martin Hope
Jorge Suárez de Lis
Asked: 2012-08-31 02:26:01 +0800 CST

与 Ubuntu 的用户组共享 Samba。用户无法访问其他用户创建的文件

  • 0

我在服务器上使用 NFS 安装了一个文件夹。该文件夹有子目录,我想通过使用 SAMBA 将特定文件夹共享给特定用户组。

它没有按预期工作,因为每个用户都可以创建文件,但是他们只能访问自己的文件,而不能访问其他人的文件。

Samba 服务器上的 NFS 挂载:

172.16.54.56:/export/proyectos on /proyectos type nfs (rw,noatime,rsize=131072,wsize=131072,acregmin=10,acl,nfsvers=3,addr=172.16.54.56)

现在只有一个文件夹:

drwsrws---+ 22 root proyecto-innovacion 3,9K 2012-08-30 11:40 innovacion

然后,有来自两个用户的文件:

-rw-rwxr--+  1 jorge.suarez  proyecto-innovacion     0 2012-08-30 12:10 Archivo de Prueba
-rw-rwx---+  1 maria.tenorio proyecto-innovacion   42K 2012-07-30 11:55 correos.xlsx

'+' 是因为 ACL,设置为对新文件设置适当的权限,因此它们始终可以访问组。这是我在 NFS 服务器上使用的唯一 ACL:

 # setfacl -d -m mask:007 /export/proyectos

事实上,两个用户都可以使用 NFS 访问彼此的文件。

如果我可以理解此命令的输出,则两个用户都可以正常映射到 Samba 组,以防万一。

# 网络用户信息 jorge.suarez
输入 root 的密码:
域用户         
项目创新  
# 网络用户信息 maria.tenorio
输入 root 的密码:
域用户         
项目创新

这是 smb.conf。我也有一个homes部分,但我省略了它:

[全球的]
    工作组 = 工作组
    netbios 名称 = SAMBASRV
    服务器字符串 = %h 服务器(Samba、Ubuntu)
    接口 = 127.0.0.0/8,eth0
    passdb 后端 = ldapsam:"ldap://10.1.176.237"
    系统日志 = 0
    日志文件 = /var/log/samba/log.%m
    最大日志大小 = 1000
    dns 代理 = 否
    ldap admin dn = "cn=目录管理器"
    ldap组后缀=ou=Groups,ou=CITIUS
    ldap 后缀 = dc=inv,dc=usc,dc=es
    ldap ssl = 否
    ldap用户后缀=ou=People,ou=CITIUS
    紧急行动 = /usr/share/samba/紧急行动 %d
    主机允许 = 172.16.54., 127.
    主机拒绝=全部
    严格锁定 = 否
[创新]
    评论 = Proyecto innovacion
    路径 = /proyectos/%S
    有效用户 = @proyecto-innovacion
    只读 = 否
    创建掩码 = 0770
    目录掩码 = 0770
    可浏览 = 否
    可浏览 = 否

总结一下这个问题,创建文件的用户可以访问他自己的文件。但没有其他人的文件。

linux
  • 1 个回答
  • 1139 Views
Martin Hope
Jorge Suárez de Lis
Asked: 2012-07-21 01:48:39 +0800 CST

无法在 Debian Lenny 上配置 PAM + LDAP - 服务器日志上出现错误 = 49

  • 1

我一直在使用 Ubuntu 10.04 迁移一些服务器和桌面,将用户从旧的 OpenLDAP 实现迁移到更新的 Centos Active Directory。到目前为止,我没有遇到任何问题,直到我到达了 Debian Lenny 服务器。

我已将服务器设置为其他服务器,设置 /etc/ldap.conf 和 /etc/ldap/ldap.conf。但是,当我发出“getent passwd”时,我从 LDAP 服务器上什么也得不到。

阅读 pam_ldap 联机帮助页,我意识到 /etc/ldap.conf 不是 pam_ldap 接受的文件 - 虽然它适用于 Ubuntu -,所以我将它重命名为 /etc/pam_ldap.conf。同样的结果。但是,一旦我更改了该文件的名称,当我使用 SSH 登录时,我会在 LDAP 服务器日志中看到:

[20/Jul/2012:11:19:40 +0200] conn=16501 fd=155 slot=155 connection from x.x.x.50 to 10.1.176.237
[20/Jul/2012:11:19:40 +0200] conn=16501 op=0 BIND dn="uid=ubuntu,ou=Applications,ou=CITIUS,dc=inv,dc=usc,dc=es" method=128 version=3
[20/Jul/2012:11:19:40 +0200] conn=16501 op=0 RESULT err=0 tag=97 nentries=0 etime=0 dn="uid=ubuntu,ou=applications,ou=citius,dc=inv,dc=usc,dc=es"
[20/Jul/2012:11:19:40 +0200] conn=16501 op=1 SRCH base="ou=People,ou=CITIUS,dc=inv,dc=usc,dc=es" scope=2 filter="(uid=jorge.suarez)" attrs=ALL
[20/Jul/2012:11:19:40 +0200] conn=16501 op=1 RESULT err=0 tag=101 nentries=1 etime=0 notes=U
[20/Jul/2012:11:19:40 +0200] conn=16501 op=2 BIND dn="uid=jorge.suarez,ou=People,ou=CITIUS,dc=inv,dc=usc,dc=es" method=128 version=3
[20/Jul/2012:11:19:40 +0200] conn=16501 op=2 RESULT err=49 tag=97 nentries=0 etime=0

密码无效。我不知道那可能是错的,其他任何事情似乎都可以。该用户/密码来自其他客户端:

[20/Jul/2012:11:29:39 +0200] conn=16528 fd=188 slot=188 connection from x.x.x.224 to 10.1.176.237
[20/Jul/2012:11:29:39 +0200] conn=16528 op=0 BIND dn="uid=ubuntu,ou=Applications,ou=CITIUS,dc=inv,dc=usc,dc=es" method=128 version=3
[20/Jul/2012:11:29:39 +0200] conn=16528 op=0 RESULT err=0 tag=97 nentries=0 etime=0 dn="uid=ubuntu,ou=applications,ou=citius,dc=inv,dc=usc,dc=es"
[20/Jul/2012:11:29:39 +0200] conn=16528 op=1 SRCH base="ou=People,ou=CITIUS,dc=inv,dc=usc,dc=es" scope=2 filter="(uid=jorge.suarez)" attrs=ALL
[20/Jul/2012:11:29:39 +0200] conn=16528 op=1 RESULT err=0 tag=101 nentries=1 etime=0 notes=U
[20/Jul/2012:11:29:39 +0200] conn=16528 op=2 BIND dn="uid=jorge.suarez,ou=People,ou=CITIUS,dc=inv,dc=usc,dc=es" method=128 version=3
[20/Jul/2012:11:29:39 +0200] conn=16528 op=2 RESULT err=0 tag=97 nentries=0 etime=0 dn="uid=jorge.suarez,ou=people,ou=citius,dc=inv,dc=usc,dc=es"

我使用 SSHA 在 LDAP 服务器上存储密码。也许这不受 Debian Lenny 支持?

在 pam_ldap.conf 上,我已经设置了它,就像在所有其他服务器中一样:

# Do not hash the password at all; presume
# the directory server will do it, if
# necessary. This is the default.
pam_password md5

也试过clear,但是没用。无论如何,发出 getent passwd 仍然让我没有用户,这很奇怪。

但是,如果我使用包 libpam-dotfile 中的 pamtest 来测试登录,它就可以工作。

# pamtest ssh jorge.suarez
Trying to authenticate <jorge.suarez> for service <ssh>.
Password: 
Authentication successful.
# pamtest foo jorge.suarez
Trying to authenticate <jorge.suarez> for service <foo>.
Password: 
Authentication successful.

但是“su”也不起作用:

# su jorge.suarez
Id. descoñecido: jorge.suarez

只是 getent passwd 的输出:

# getent passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
libuuid:x:100:101::/var/lib/libuuid:/bin/sh
Debian-exim:x:101:103::/var/spool/exim4:/bin/false
statd:x:102:65534::/var/lib/nfs:/bin/false
sshd:x:104:65534::/var/run/sshd:/usr/sbin/nologin
luser:x:1000:1000:Usuario local de Burdeos,,,:/home/luser:/bin/bash
messagebus:x:105:107::/var/run/dbus:/bin/false
sge-admin:x:1001:1001:Administrador do SGE,,,:/home/cluster/sge-admin:/bin/bash
ntp:x:107:110::/home/ntp:/bin/false
haldaemon:x:108:111:Hardware abstraction layer,,,:/var/run/hald:/bin/false
vde2-net:x:109:114::/var/run/vde2:/bin/false
uml-net:x:110:115::/home/uml-net:/bin/false
polkituser:x:111:116:PolicyKit,,,:/var/run/PolicyKit:/bin/false
Debian-pxe:x:113:65534:Dummy user for Debian pxe package,,,:/home/Debian-pxe:/bin/false

Nscd 从一开始就停止了。

linux
  • 1 个回答
  • 835 Views
Martin Hope
Jorge Suárez de Lis
Asked: 2012-07-18 07:39:53 +0800 CST

NFS exportfs 垃圾邮件日志。这是一个损坏的设置吗?

  • 1

我有一个运行 Ubuntu 10.04 的 NFS 服务器,服务于 OCFS2 文件系统。设置有点复杂,因为服务器安装了 Heartbeat 和 Pacemaker 以与另一台服务器建立集群。

不管怎样,奇怪的是:

# tail -12 /var/log/messages
Jul 17 17:15:45 ctserv01 exportfs[14870]: INFO: Directory /export/homes is exported to 172.16.54.0/24 (started).
Jul 17 17:15:45 ctserv01 exportfs[14869]: INFO: Directory /export/proyectos is exported to 172.16.54.0/24 (started).
Jul 17 17:15:45 ctserv01 exportfs[14871]: INFO: Directory /export is exported to 172.16.54.0/24 (started).
Jul 17 17:16:15 ctserv01 exportfs[15960]: INFO: Directory /export/proyectos is exported to 172.16.54.0/24 (started).
Jul 17 17:16:15 ctserv01 exportfs[15961]: INFO: Directory /export is exported to 172.16.54.0/24 (started).
Jul 17 17:16:15 ctserv01 exportfs[15962]: INFO: Directory /export/homes is exported to 172.16.54.0/24 (started).
Jul 17 17:16:45 ctserv01 exportfs[17054]: INFO: Directory /export/proyectos is exported to 172.16.54.0/24 (started).
Jul 17 17:16:45 ctserv01 exportfs[17055]: INFO: Directory /export/homes is exported to 172.16.54.0/24 (started).
Jul 17 17:16:45 ctserv01 exportfs[17056]: INFO: Directory /export is exported to 172.16.54.0/24 (started).
Jul 17 17:17:15 ctserv01 exportfs[18168]: INFO: Directory /export is exported to 172.16.54.0/24 (started).
Jul 17 17:17:15 ctserv01 exportfs[18169]: INFO: Directory /export/proyectos is exported to 172.16.54.0/24 (started).
Jul 17 17:17:15 ctserv01 exportfs[18170]: INFO: Directory /export/homes is exported to 172.16.54.0/24 (started).

日志显示 exportfs 每 30 秒重新生成一次。NFS 服务器大部分时间工作正常,但几天后,它开始每 13-15 分钟挂起长达 20 秒,人们为此大声疾呼。

可能 Pacemaker、Heartbeat 或其他东西导致了这种情况。或者这可能是预期的行为,问题应该出在其他地方?

Pacemaker 配置(注意 /export/proyectos 现在已停止):

# crm configure show
node $id="06334af6-e766-457c-8c30-457080276507" ctserv01
node $id="bf53e028-9f27-4ef3-bb45-4fcef981e441" ctserv02
primitive ClusterIP ocf:heartbeat:IPaddr2 \
    params ip="172.16.54.56" cidr_netmask="24" nic="eth0"
primitive exports_nfs_home ocf:heartbeat:exportfs \
    params rmtab_backup="none" directory="/export/homes" clientspec="172.16.54.0/24" options="rw,async,no_subtree_check,insecure,root_squash" fsid="1" \
    op monitor interval="30s" \
    op start interval="0" timeout="240s" \
    meta target-role="Started"
primitive exports_nfs_proys ocf:heartbeat:exportfs \
    params rmtab_backup="none" directory="/export/proyectos" clientspec="172.16.54.0/24" options="rw,async,no_subtree_check,insecure,root_squash" fsid="2" \
    op monitor interval="30s" \
    op start interval="0" timeout="240s" \
    meta target-role="Stopped"
primitive exports_nfs_root ocf:heartbeat:exportfs \
    params rmtab_backup="none" directory="/export" clientspec="172.16.54.0/24" options="rw,async,no_subtree_check,insecure" fsid="0" \
    op monitor interval="30s" \
    op start interval="0" timeout="240s"
group grupo_nfs ClusterIP exports_nfs_root exports_nfs_home exports_nfs_proys
location nodo_preferido grupo_nfs 100: 06334af6-e766-457c-8c30-457080276507
order orden_de_recursos inf: ClusterIP exports_nfs_root exports_nfs_home exports_nfs_proys
property $id="cib-bootstrap-options" \
    dc-version="1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c" \
    cluster-infrastructure="Heartbeat" \
    stonith-enabled="false" \
    no-quorum-policy="ignore" \
    expected-quorum-votes="2" \
    cluster-recheck-interval="60min"
nfs heartbeat pacemaker nfs4 ocfs2
  • 1 个回答
  • 1015 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