我的问题是: Debian 6.0 (Squeeze) 中默认启用了哪些缓冲区溢出/堆栈粉碎防御(如果有)?
Ubuntu 有一个方便的汇总表,显示了每个服务器版本发行版的主要安全特性,但我还没有找到与 Debian 类似的东西。Ubuntu 提到:
Debian 6.0 在多大程度上使用了类似的技术(默认情况下)?
我有一个 golang 程序,我想在它在 Debian Squeeze 框上终止后重新启动。事情是在 Apache 2 mod_proxy 设置后面提供 HTTP。我不希望这个过程失败,但我想有一些保险。
在 Ubuntu 上,我会使用 upstart 来保持进程的活跃。据我所知,Debian 不喜欢 Upstart,因为它是 init 的替代品。
有没有一种替代方法可以在一个或多个进程终止后重新启动它们,该进程在 Squeeze 上工作并与 init 一起玩得很好?
我目前正在设置一个新的 Debian (6.0.5) 服务器。我昨天在上面放了仙人掌(0.8.7g),从那以后就一直在与它作斗争。
我观察到的最初问题是我的图表没有更新。所以我检查了我的cacti.log并发现了这个关于消息:
POLLER: Poller[0] Maximum runtime of 298 seconds exceeded. Exiting.
Run Code Online (Sandbox Code Playgroud)
那不可能是好事,对吧?所以我去检查并开始poller.php自己(通过sudo -u www-data php poller.php --force)。它会输出大量消息(看起来都像我期望的那样)然后挂起一分钟。1 分钟后,它将循环显示以下消息:
Waiting on 1 of 1 pollers.
Run Code Online (Sandbox Code Playgroud)
这将持续 4 分钟,直到该过程因运行时间超过 298 秒而被强制结束。
我花了一个小时试图确定可能仍在运行的 poller ,直到我得出结论,根本没有正在运行的 poller。
我检查poller.php了该警告的发出方式以及原因。在第 368 行,Cacti 将从数据库中检索已完成进程的数量,并使用该值来计算有多少进程仍在运行。所以,让我们看看这个价值!
我将以下调试代码添加到poller.php:
$finished_processes = db_fetch_cell("SELECT count(*) FROM cacti.poller_time WHERE poller_id=0 AND end_time>'0000-00-00 00:00:00'");
print "Finished: " . $finished_processes . " - Started: " . $started_processes . …Run Code Online (Sandbox Code Playgroud) 我的 VPS 映像 (Debian 6) 预装了 sendmail 作为 MTA。我会将此服务器用作 Web 服务器,也可能用作其他用途,但不会用作邮件服务器。我想删除尽可能多的不需要的服务以节省资源。MTA 可以安全移除吗?后果是什么?
我正在使用来自 backports 的 PostgreSQL 9.1 的 debian 挤压。Puppet 版本为 2.7.14。不幸的是,init 脚本返回了错误的状态退出代码。因此我编写了一个自定义status命令来检测 postgresql 是否正在运行。
service { 'postgresql':
ensure => running,
enable => true,
hasstatus => false,
hasrestart => true,
status => "pg_lsclusters -h | awk 'BEGIN {rc=0} {if ($4 != \"online\") rc=3} END { exit rc }'",
provider => debian,
}
Run Code Online (Sandbox Code Playgroud)
我的命令像魔法一样有效,但 puppet 似乎有问题。notice: /Stage[main]/Postgresql/Service[postgresql]/ensure: ensure changed 'stopped' to 'running'尽管它已经在运行,但我总是得到。
所以尝试了以下方法:
service { 'postgresql':
ensure => running,
enable => true,
hasstatus => false,
hasrestart => true,
status …Run Code Online (Sandbox Code Playgroud) 我有两个不同的 (i386 v AMD) Debian 机器并且有同样的问题。logrotate 不会自动旋转我的日志。当我手动强制它时它工作正常
/usr/sbin/logrotate -f /etc/logrotate.conf
但这对我来说不好。
设置没有修改(至少我没有修改它们),AMD 盒子是全新安装的,但不能完成它的工作。
如果您注意到类似的问题,请帮助我。
更新(一些服务器输出):
logrotate -d http://pastebin.com/e6AshtGq
ls -l /var/log http://pastebin.com/Y2A4Li59
cat /etc/logrotate.conf http://pastebin.com/1h7Uwctr
ls -l /etc/logrotate.d http://pastebin.com/NvUAeszM
我从 rkhunter 收到以下错误。我最近将我的服务器从 lenny 升级到了挤压,这可能导致了问题。如何解决此问题或隐藏错误消息?
Warning: The modules file '/proc/modules' is missing.
Warning: Suspicious file types found in /dev:
/dev/shm/network/ifstate: ASCII text
Warning: Hidden directory found: /dev/.udev
Run Code Online (Sandbox Code Playgroud)
我也没有收到第二封电子邮件:Please inspect this machine, because it may be infected.请问有人能指出我正确的方向来找出这些错误的原因吗?
我知道很多人在寻找 modprobe 时遇到问题,这主要是由于未配置的 $PATH。但是这次我登录了一台机器(Linux mymachine 2.6.32-6-pve #1 SMP Mon Jan 23 08:27:52 CET 2012 i686 GNU/Linux with root rights)并且根本没有找到 modprobe。这是我迄今为止采取的步骤:
- which modprobe => no results
- locate modprobe => no results
- my $PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:
- find / -name "modprobe*" => /proc/sys/kernel/modprobe
- cat /proc/sys/kernel/modprobe => /sbin/modprobe
- /sbin/modprobe => no such file or directory
Run Code Online (Sandbox Code Playgroud)
屁股你根本看不到modprobe。有没有其他人有建议/解决方案,以便我可以使用 modprobe?
我有一个脚本可以下载和替换 Debian 压缩中的内核头文件。
function fixHeaders(){
#Replace the kernel headers from OVH with standard kernel headers...
aptitude -y install linux-image-2.6.32-5-amd64
sed s/'GRUB_DEFAULT=0'/'GRUB_DEFAULT=1'/g
update-grub
echo "Rebooting the machine. Run this script again after reboot and choose option 2."
sleep 1
reboot
}
Run Code Online (Sandbox Code Playgroud)
我遇到的问题是,在 aptitude 下载软件包后,它会将脚本放入文本 gui 并询问用户一堆问题。有什么办法可以跳过这个或在适当的时间发送选项卡/输入来为所有答案选择“确定”?
我按照 workaround.org 上的教程(Debian Squeeze 的 ISPmail 教程)在 Debian Squeeze 上设置了带有 Dovecot、Postfix 和 AMaViS 的邮件服务器。它使用虚拟域并将域、电子邮件地址和帐户存储在 MySQL 数据库中。
一切正常——除了我缺少一些电子邮件标题。
(使用“真正的”垃圾邮件并通过 GTUBE 使用sendmail email@example.com < /usr/share/doc/spamassassin/examples/sample-spam.txt)
但是垃圾邮件会改变主题。所以我把一切都设置正确了,不是吗?
如何在我的邮件中获取那些丢失的标题?
这是我的 AMaViS 配置文件 ( /etc/amavis/conf.d/50-user)
use strict;
#
# Place your configuration directives here. They will override those in
# earlier files.
#
# See /usr/share/doc/amavisd-new/ for documentation and examples of
# the directives you can use in this file …Run Code Online (Sandbox Code Playgroud) debian-squeeze ×10
debian ×6
email-server ×2
linux ×2
amavis ×1
apt ×1
aptitude ×1
bash ×1
cacti ×1
init.d ×1
kernel ×1
logrotate ×1
modprobe ×1
php ×1
postgresql ×1
puppet ×1
rkhunter ×1
security ×1
sendmail ×1
spamassassin ×1