Articles of linux

从多个进程同时调用ip地址添加是否安全?

我有一个在启动时将许多NBD服务器绑定到networking接口的服务,每个服务都有自己的IPv6地址。 为了做到这一点,首先需要将地址添加到正确的界面。 目前,这是连续完成的,一次执行: ip addr add <foo> dev <bar> 每个NBD设备。 ip addr del在关机时有一个匹配的序列。 我想通过分叉这些调用来加速它们,使它们平行运行。 这已知是安全的,已知是不安全的,或两者都不是? 手册页没有帮助,我承认来源将超过我的头。 我不是很满意,只是运行它,看到它的工作,因为我不知道我是否幸运。 如果有问题的话,我在Debian Squeeze上运行它,它的内核版本是2.6.32。

OpenIDap与ppolicy

我们正在安装使用shadowAccount属性的OpenLDAP版本2.4。 我想启用ppolicy覆盖。 我已经完成了OpenLDAP提供的步骤和教程 。 我已经对slapd.conf进行了更改并导入了密码策略。 在重新启动OpenLDAP工作正常,我可以看到密码的政策,当我做一个LDAPsearch。 用户对象如下所示。 # extended LDIF # # LDAPv3 # base <dc=xxxxx,dc=in> with scope subtree # filter: uid=testuser # requesting: ALL # # testuser, People, xxxxxx.in dn: uid=testuser,ou=People,dc=xxxxx,dc=in uid: testuser cn: testuser objectClass: account objectClass: posixAccount objectClass: top objectClass: shadowAccount shadowMax: 90 shadowWarning: 7 loginShell: /bin/bash uidNumber: 569 gidNumber: 1005 homeDirectory: […]

如何将区域传输仅限制到特定的授权服务器

我最近由于以下原因而无法进行PCI合规性扫描: 这个DNS服务器允许不受限制的区域传输。 攻击者可能能够使用这些信息来获取networking结构的知识,以便在实际攻击之前帮助进行设备发现。 build议的解决scheme如下: 重新configuration此DNS服务器以将区域传输限制到特定的授权服务器。 我正在运行一个专用的Linux Centos服务器。 我的理解是我必须编辑/etc/named.conf文件,我已经完成了,相关部分如下: options { acl "trusted" { 127.0.0.1; xxx.xxx.xxx.001; //this is one of the server's ip's xxx.xxx.xxx.002; //this is another server's ip }; allow-recursion { trusted; }; allow-notify { trusted; }; allow-transfer { trusted; }; }; 然后,我重新启动了命名服务/etc/rc.d/init.d/named restart并请求重新扫描,由于相同的原因再次失败。 我在这里错过了很明显的东西吗

使用OpenLDap帐户locking

在openldap中实现帐户locking的最佳方式是什么? 我有一个Ubuntu桌面客户端连接到它进行身份validation的OpenLDAP服务器。 我想他的帐户被locking在说5失败的authentication尝试之后 我在slapd.conf中启用了ppolicy布局。 overlay ppolicy ppolicy_default “cn=default,ou=policies,dc=example,dc=in” ppolicy_use_lockout 我现在也input了一个政策。 这是ldapsearch的输出 # policies, example.in dn: ou=policies,dc=example,dc=in ou: policies objectClass: top objectClass: organizationalUnit # default, policies, pramata.in dn: cn=default,ou=policies,dc=example,dc=in objectClass: top objectClass: device objectClass: pwdPolicy cn: default pwdAttribute: userPassword pwdMaxAge: 7776002 pwdExpireWarning: 432000 pwdInHistory: 0 pwdCheckQuality: 1 pwdMinLength: 8 pwdMaxFailure: 5 pwdLockout: TRUE pwdLockoutDuration: 900 pwdGraceAuthNLimit: […]

我怎样才能得到HTTPD服务的HTML / PHP文件,而不是列出/索引他们在虚拟主机的文件夹。 使用Centos 6.0

我的虚拟主机configuration如下,初始时我甚至无法进入/public_html/目录时,inputexample.com和Apache将只是服务于我的默认欢迎页面,我也会得到错误: Directory index forbidden by Options directive: /var/www/html/example.com/public_html/在日志中。 编辑welcome.conf页面( – 索引)后,当我现在键入example.com时,不会再显示/public_html/ contents(Index.php)在浏览器中编入索引。 在那里我想要它实际执行和diplay index.php页面。 vhost.conf,位于etc / httpd / vhost.d / NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin [email protected] ServerName localhost ServerAlias localhost.example.com DocumentRoot /var/www/html/example.com/public_html/ ErrorLog /var/www/html/example.com/logs/error.log CustomLog /var/www/html/example.com/logs/access.log combined </VirtualHost> <VirtualHost *:80> ServerAdmin [email protected] ServerName example.org ServerAlias www.example.org DocumentRoot /var/www/html/example.org/public_html/ ErrorLog /var/www/html/example.org/logs/error.log CustomLog /var/www/html/example.org/logs/access.log combined </VirtualHost> httpd.conf,默认设置,加到最后: […]

Linux – 文件夹中最新修改文件的date

我想在这里完成的是这样的: 我有一个Apache网站,并在该网站上,我想要显示的东西 Latest website update: 01/12/2011 at 6h32 AM 我有一个想法如何做到这一点。 我可以编写一个小时脚本来检查/ var / www中的最新修改文件的date。 然后将此值存储在文件或数据库中以便快速访问。 我该怎么做,如果你有更好的主意,请与我分享。

我需要更多的系统资源来运行DB2而不是MySQL吗?

我需要将我的Web应用程序从MySQL转换为在DB2上运行。 我需要事先知道我是否需要一个高规格的服务器来确保Web应用程序的执行速度与现在的MySQL相同。 该应用程序是一个非常数据库密集型数据分析应用程序与浏览器界面 现在只使用大约20%的可用CPU功率和30%的内存。 如果转换成DB2,会花费更多的CPU还是内存? 我需要一个高规格的服务器? 我只是寻找任何普遍的感觉,如果一切都保持相等(数据库大小,stream量等),是否需要升级服务器到MySQL到DB2的转换。

closures302redirect并自动redirect

我正在我的本地主机上使用curltestingredirect。 当我运行这个命令时: $curl "test.test.com/landing/0192" 我得到这个输出: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href="http://redirect.redirect.com/landing?xid=0192&amp;tt=192">here</a>.</p> <hr> <address>Apache/2.2.17 (Fedora) Server at spencervm.adverplex.com Port 80</address> </body></html> 现在,如果我运行http://redirect.redirect.com/landing?xid=0192&amp;tt=192"我到达了我想要的目的地,所以基本上我想要做的就是closures302错误并redirect到它的页面应该redirect到。

virsh执行缓慢

我在Xen 4.中使用libvirt 。每次使用virsh工具时,都需要很长时间才能启动。 我在Xen虚拟机pipe理程序所在的机器上启动virsh 。 例: root@xen1:~#: time virsh list Id Name State ———————————— 0 Domain-0 running real 0m6.505s user 0m0.000s sys 0m0.020s 我怎样才能加快速度呢? 当我没有参数运行virsh时也会发生这种情况。 我没有得到任何错误,即使在日志文件。

使用裸共享回购的Linux上的git的权限错误

我有一个光秃的中央回购有这个选项打开: git config core.sharedRepository true 出于某种原因,CentOS机器上的其他用户从中央仓库中拉出/推入时,总是遇到许可错误,当他们推到某个已经被推送的分支时。 我查看了目标目录,并意识到谁先推送他们的用户名设置为所有者和组。 我已经设置好了,所有的用户都属于“开发者”组,然后chgrp -R裸露的回购是属于“开发者”的集体所有权,但是这还没有解决问题。 还有其他build议吗? 更多信息: 这是我推时发生的事情: [dave@localhost wd]$ git push Counting objects: 5, done. Compressing objects: 100% (2/2), done. error: insufficient permission for adding an object to repository database ./objects fatal: failed to write object error: pack-objects died of signal 13 error: failed to push some refs to '/gitrepos/repo.git' […]