免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2874 | 回复: 6
打印 上一主题 下一主题

[求助] hp-ux 没有sendmail.mc和ftp的配置文件以及记录usb插拔记录的日志文件吗? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-09-08 13:56 |只看该作者 |倒序浏览
10可用积分
本帖最后由 sigaction 于 2012-09-08 14:56 编辑

在hp-ux下有/etc/mail/sendmail.cf    没有像Linux上的那个sendmail.mc 文件吗?

更奇怪的是也没有找到记录useradd和userdel这两条操作的日志文件,就比如useradd zhangsan 添加一个用户,在Linux下是/var/log/secure这个文件,hp-ux下是什么呢?连插拔优盘的操作我也没有找到,还以为是在syslog里呢,也没发现····

还有就是没找到关于ftp服务的配置文件····

系统是hp-ux B.11.31,这是怎么回事呢?

····

论坛徽章:
0
2 [报告]
发表于 2012-09-10 09:43 |只看该作者
HP-UX下,sendmail缺省的配置文件就是:/etc/mail/sendmail.cf

论坛徽章:
0
3 [报告]
发表于 2012-09-10 09:53 |只看该作者
The regular useradd/userdel commands won't generate any syslog messages. So if you want the commands logged using the syslog mechanism specifically, you must replace the regular useradd/userdel with something that will do it.

For example:

# mv /usr/sbin/useradd /usr/sbin/useradd.real
# vi /usr/sbin/useradd
-----
#!/usr/bin/sh
/usr/sbin/useradd.real "$@"
RESULT=$?
if [ $RESULT -eq 0 ]; then
logger -t useradd -p local0.notice -i "\"useradd $*\" executed successfully by $(whoami)"
else
logger -t useradd -p local0.notice -i "Failed \"useradd $*\" attempt by $(whoami)"
fi
return $RESULT
----
# chmod a+x /usr/sbin/useradd

... and similarly for userdel.

评分

参与人数 1可用积分 +5 收起 理由
lbseraph + 5 谢谢积极回复!

查看全部评分

论坛徽章:
0
4 [报告]
发表于 2012-09-10 10:10 |只看该作者
在Linux下一般是配置好sendmail.mc后再用m4生成cf是吧,hp-ux不是这样而是直接修改sendmail.cf
文件吗啊

论坛徽章:
0
5 [报告]
发表于 2012-09-10 10:20 |只看该作者
也就是说在hp-ux里像useradd等操作默认是不记录的啊····学习了···,那usb插拔记录就不知记不记录了···

论坛徽章:
0
6 [报告]
发表于 2012-09-10 11:12 |只看该作者
#!/usr/bin/sh

#
# Steven E Protter
# This script is a mod if a port request that I made on itrc forums a few
# It builds the sendmail databases to stop spam and support virtual domains
# with sendmail 8.11 and lower 8.x versions.
# I've slighly impproved the effort of the original Jordan Bean script
# and made it compatible with being run from cron. It stops and starts the
# sendmail daemon though that is apparently unnecessary
#


/usr/sbin/newaliases
cd /etc/mail


/usr/sbin/makemap -rv dbm access_db < access
/usr/sbin/makemap -rv dbm domaintable_db < domaintable
/usr/sbin/makemap -rv dbm genericstable_db < genericstable
/usr/sbin/makemap -rv dbm mailertable_db < mailertable
/usr/sbin/makemap -rv dbm virtusertable_db < virtusertable
cp /etc/mail/sendmail.cf /root

echo "Waiting for files to comd online."


cd /usr/newconfig/etc/mail/cf/cf/
/usr/newconfig/etc/mail/cf/cf/gen_cf << EOF
y
2 6 11 12 15 19 20 21 22
EOF
# /usr/bin/m4 /etc/mail/sendmail.mc > /etc/sendmail.cf

cp /usr/newconfig/etc/mail/cf/cf/sendmail.cf.gen /etc/mail/sendmail.cf

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start


回复 4# sigaction


   

评分

参与人数 1可用积分 +5 收起 理由
lbseraph + 5 谢谢积极回复!

查看全部评分

论坛徽章:
0
7 [报告]
发表于 2012-09-10 11:52 |只看该作者
谢谢了,这个脚本好像是关于防范垃圾邮件等配置的···其实我想知道我在Linux上用的那个叫sendmail.mc 的文件是否能在hp-ux上用,如果不用mc文件的话,用cf也可以是吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP