Articles of linux

如何configurationCyrus IMAP将缺省领域提交给SASL?

我已经configurationPostfix使用纯文本来处理SASL,前者在请求身份validation时自动向后者提交默认领域。 假设域名是example.com,用户是foo,那么到目前为止,我是如何在我的Debian系统上configuration的。 在后缀configuration文件/etc/main.cf : smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $mydomain SMTPconfiguration文件/etc/postfix/smtpd.conf包含: pwcheck_method: saslauthd mech_list: PLAIN SASL守护进程在/etc/default/saslauthd使用sasldb机制进行configuration: MECHANIMS="sasldb" SASL数据库文件包含一个用户,由sasldblistusers2 : [email protected]: userPassword 身份validation运行良好,而不必提供一个领域,postifx这样做对我来说。 但是,我不知道如何告诉Cyrus IMAP守护进程执行相同的操作。 我在我的SASL数据库中创build了一个用户cyrus ,它使用主机域名领域,而不是example.com ,用于pipe理目的。 我用这个帐号通过cyradm为用户foo创build一个邮箱: cm user.foo IMAP在/etc/imapd.conf是这样configuration的: allowplaintext: yes sasl_minimum_layer: 0 sasl_pwcheck_method: saslauthd sasl_mech_list: PLAIN servername: mail.example.com 如果我启用跨域身份validation( loginrealms: example.com ),尝试使用imtest进行身份validation可以使用以下选项: imtest -m login -a [email protected] localhost 不过,我希望能够进行身份validation,而无需指定领域,如下所示: imtest -m login […]

亚马逊Ec2 Linux仍然显示旧的卷大小,即使增加

最初我有EBS boot作为AMI图像与10GB EBS卷。 然后我创build了新的20Gb EBS卷,然后将其附加到旧实例并启动 然后我看到,我仍然有10GB安装为/dev/xvda1 那我跟着这个啧啧 http://blog.linuxacademy.com/linux/resizing-root-partition-on-linux-in-amazon-ec2/ 我做到了 sudo resize2fs /dev/xvda1 resize2fs 1.41.12 (17-May-2010) The filesystem is already 2620603 blocks long. Nothing to do! $ sudo su [root@ip-]# df -m Filesystem 1M-blocks Used Available Use% Mounted on /dev/xvda1 10077 7096 2470 75% / none 828 1 828 1% /dev/shm /dev/xvdb2 144578 33 144545 1% […]

如何pipe道和回应正在处理的结果?

我想执行这个命令: find /apps/ -type f -print0 | grep -z log$ | xargs -0 grep 'this->aForm' 并行,我想看看哪些文件正在处理。 如何对此?

为什么我在公开密钥login到centos的时候会犯错误的尝试?

我使用亚马逊EC2,我有公钥encryption。 我正在检查/var/log/secure文件,我得到这个 Jul 17 21:14:18 server sshd[26590]: Excess permission or bad ownership on file /var/log/btmp Jul 17 21:14:18 server sshd[26591]: input_userauth_request: invalid user net Jul 17 21:14:18 server sshd[26591]: Received disconnect from 195.189.62.29: 11: Bye Bye Jul 17 21:14:22 server sshd[26592]: Invalid user internet from 195.189.62.29 Jul 17 21:14:22 server sshd[26592]: Excess permission or bad […]

如果请求在中间设备上超时,数据包如何能够传送到下一个设备?

我注意到,在很多跟踪路由中,当* * * Request timed out出现在中间跳跃的某个地方时,数据包能够将其传送到后续设备。 3 13 ms 8 ms 9 ms pos-0-3-0-0-cr01.newyork.ny.ibone.comcast.net [68.86.90.57] 4 95 ms 100 ms 9 ms xe-10-1-0.edge1.NY.exampleISP1.net [10.78.169.45] 5 * * * Request timed out. 6 809 ms 808 ms * ms nyc-core-01.inet.example2.com [192.168.33.10] 在第五跳上,当请求超时,数据包如何能够到达第六个设备? 我认为“* * *请求超时”意味着第五个设备由于某种原因无法访问(例如它不接受icmp数据包)。

在bash脚本中捕获Python脚本的输出

我有一个监视游戏服务器的脚本。 它是用bash写的。 不过,我试图把高级监视器放在一起,如果服务器已经locking了。 这需要一个小的python脚本来查询服务器,并返回OK,ERROR 1或ERROR 2.捕获输出的最好方法是什么? 目前与脚本variables是空的。 我可以确认脚本运行正常并返回消息。 if [ -f serverquery.py ];then echo -e "[\e[0;36m INFO\e[0;39m ] Running advanced monitoring serverquery.py" echo -e "$( date '+%b %d %H:%M:%S') ${servicename}: Running advanced monitoring serverquery.py" >> ${logfile} serverquery=`./serverquery.py 127.0.0.1 27015` if [ "${serverquery}" = "ERROR 1" ];then echo -e "[\e[0;31m FAIL\e[0;39m ] ${servicename}: serverquery.py Monitor detected […]

无法重新启动同步文件系统

我有一个Linux服务器的问题。 每周运行一次的mysql实例挂起,没有办法完全停止它。 如果我杀了它,它仍然处于僵尸状态,并且init不会收获它的pid。 该服务器用于暂存部署和一些内部工具,所以不会承受沉重的负担。 唯一的过程中不断使用id的MySQL,为此我认为这是唯一的过程中遭受这个问题。 我search了系统日志中的错误,唯一发现的是这个错误(重复了几次)在dmesg输出: [706560.640085] INFO: task mysqld:31965 blocked for more than 120 seconds. [706560.640198] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [706560.640312] mysqld D ffff88032fd93f40 0 31965 1 0x00000000 [706560.640317] ffff880242a27d18 0000000000000086 ffff88031a50dd00 ffff880242a27fd8 [706560.640321] ffff880242a27fd8 ffff880242a27fd8 ffff88031e549740 ffff88031a50dd00 [706560.640325] ffff88031a50dd00 ffff88032fd947f8 0000000000000002 ffffffff8112f250 [706560.640328] Call Trace: [706560.640338] [<ffffffff8112f250>] ? __lock_page+0x70/0x70 [706560.640344] […]

当试图将文件从Linux复制到Windows时,scp卡住了

我使用下面的scp语法为了将文件从Linux红帽子5转移到Windows机器(在Temp目录下), 备注: SSH服务器已经安装在Windows机器上 我在我的shell脚本中使用这一行 sshpass -p '$password' /usr/bin/scp -o StrictHostKeyChecking=no $FILE [email protected]:'D:/Temp' 在大多数情况下文件传输成功 但有时scp卡在文件传输? ,尽pipe连接是可以的,如ping等 并从scp(经过很长时间)得到以下错误 ssh_exchange_identification: read: Connection reset by peer 为什么SCP不稳定和卡住? ,以及这个问题的解决scheme是什么? 什么别人好的替代scp? ,(考虑到我需要100%的稳定性)

Squid代理和ADauthentication在Squid启动时产生错误

我需要一些build议,当我尝试启动集成NTLM / ADauthentication设置的Squid时出现错误。 inheritance人的背后故事: 我已经在服务器的设置,安装和configuration上遵循了这个指南 。 到目前为止,一切进展顺利,我觉得我离得到这个系统运行分钟。 我有能力做 Wbinfo -a administrator kinit Administrator klist 每个命令都会给出确认,确认它已成功运行并按预期工作。 Linux框已经成功join我的域名,我可以在用户和组上进行AD查询。 但是,当我尝试启动鱿鱼服务,我从CLI获取以下内容。 [root@squid ~]# service squid start Starting squid: . [ OK ] 但是,然后从我的浏览器得到连接错误,说代理服务器拒绝连接,在/var/log/squid/cache.log内进一步调查鱿鱼显示以下错误。 2013/07/31 09:57:30| StatefulHandleRead: no callback data registered 2013/07/31 09:57:30| helperHandleRead: unexpected read from basicauthenticator #2, 28 bytes 'NT_STATUS_OK: Success (0x0) ' 2013/07/31 09:57:30| helperHandleRead: unexpected read […]

使用dhcp为ipv6发送networking掩码和网关/路由

我已经build立了一个DHCP服务器来分配ipv6给我的客户端。 但是,“路由器”和“子网”选项都被忽略。 我读过,ipv6不能从DHCP获取这些,而是​​从路由器broatcast。 不过,我觉得这很奇怪。 为什么从DHCP获得一个静态IP,但从路由器的networking掩码? 奇怪的build筑。 无论如何,我想知道是否有一种方法可以轻松地将这些“缺失”function添加到DHCPv6或任何其他工作。 最终的结果应该是我可以根据客户端的MAC地址从一个中心位置设置“ip6”,“netmask”和“网关”,就像我可以用ipv4做的一样。 我不想搞乱ipv6自动configuration和无状态的东西。 网关问题,我可以通过在networkingconfiguration中的“up”事件上设置一些“坏”的方法来解决,但我找不到一个方法来改变接口的networking掩码。