用rsh实现关机用户
2009-05-13 01:23:43来源:未知 阅读 ()
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
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- Freebsd oracle 10g 2009-05-13
- FreeBSD下nginx+fast-cgi+mysql+zend的实现 2009-05-13
- KDE/FreeBSD 测试 QT-4.5.1. 2009-05-13
- OpenBSD 4.5下安装Gnome 2.24成功! 2009-05-13
- 问一下:ipfw+natd 如何实现回流端口映射 2009-05-13
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash