免费注册 查看新帖 |

Chinaunix

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

用rsh实现关机用户 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-08-15 16:04 |只看该作者 |倒序浏览

                Last time I mentioned that I saw a "Shutdown" user account on a Solaris machine. I didnot see how it worked, however, only to guess that rsh might be of use. Today I tried to work out that on my FreeBSD5.3 box and got it in a freebsd way. Firstly, rshd must start. Then .rhosts should be built under root''s home directory, with the shutdown account authenticated like,     localhost shutdownYet what frustrated me is that root seemed not able to be accessed through rsh. After more scrutination of the rshd manpage, I managed to get root accessible by modifing /etc/pam.d/rsh file at the line,    auth  required  pam_rhosts.so  no_warn  allow_rootallow_root is added to make root accessible through rsh! Then the only thing left is to add "rsh localhost -l root init 0" to shutdown-account''s .profile. Here a just normal priviliege setting is required for the shutdown-account. Actually you donot need to make an account to login. A script is also applicable to normal users. And in the other way, during the time I was making my way out, I also find some other ways for a shutdown-accout. Most are endowed with root equivalent privilieges. For example, the simplest is to make a root equivalent account and add shutdown script to its .profile. Another way is to edit /etc/passwd to modify normally /bin/sh field to a shutdown script. Either should be ok. I havent tried them, however. Yet what is indisputable is that security might be, more or less, a problem, in all the above shutdown-accout implementations.
               
               


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/8091/showart_42199.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP