Linux下的密码破解和密码保护

          Linux下的密码破解和密码保护

 

第一部分:如何破解root密码。
linux安装完毕后会有一个root用户。那么如何在不知道密码的情况下修改掉root用户的密码呢?
本系统使用RedHat Linux 安装环境是vmware6.0 使用GRUB引导。
方法如下:
1.在grub引导界面中按“e”进入grub的编辑模式。
2.编辑模式下选择第二项,即:“kernel /vmlinuz-2.4.20-8ro root=LABEL=/”。然后再按“e”编辑此项。
3.在后面加上“ single”(注意:前面有一个空格)。然后回车,再按“b”这样就启动了linux的单用户模式。
4.由于是单用户模式,所以不需要密码。启动完毕后,在提示符下(注意这时提示符是sh-2.05b#之类的,不是以前的提示符了)输入:“passwdroot”(passwd是修改用户密码的命令。)。然后根据提示修改密码就可以了。(有时会提示badpassword,没有关系的。主要是设置的密码过于简单或者是常见的单词的原因。)
5.重启,正常进入。OK,root密码被修改了。

第二部分:防止别人通过单用户模式修改密码。
    由于想引导单用户模式需要在grub中进行编辑。因此,我们只要对grub进行加密,不让别人修改grub就可以防止了。

方法如下:
1.grub有一个配置文件,在/etc这个文件夹中。名称是“grub.conf”,找到这个文件,用vi编辑。
2.我们看下文件中的内容:(注释就免了)
default=0
timeout=10

Password=135246
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd0,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /initrd-2.4.20-8.img



具体含义大家可以查看下grub的相关文档,这里我们要加进密码。
共有两个地方可以添加密码。
3.第一处是“timeout=10”的下面,在这里加上“password=123456”(123456是自己的密码)。保存,退出,重启。我们可以看到,在grub的界面上已经不可以按“e”进行修改了。想修改必须按“p”输入密码后进行修改。
4.第二处是“initrd /initrd-2.4.20-8.img”的下面。在这里加上“password=123456”(123456是自己的密码)。保存,退出,重启。我们可以看到,linux启动前(过了grub界面)又多了一个密码。值得注意的是:这个密码是可以防止单用户模式进入的。也就是说,即使我们通过编辑grub启动单用户模式,还是要输入这个密码的。

Computers and computer networks are one of the most incredible inventions of the 20th century, having an ever-expanding role in our daily lives by enabling complex human activities in areas such as entertainment, education, and commerce. One of the most challenging problems in computer science for the 21st century is to improve the design of distributed systems where computing devices have to work together as a team to achieve common goals. In this book, I have tried to gently introduce the general reader to some of the most fundamental issues and classical results of computer science underlying the design of algorithms for distributed systems, so that the reader can get a feel of the nature of this exciting and fascinating field called distributed computing. The book will appeal to the educated layperson and requires no computer-related background. I strongly suspect that also most computer-knowledgeable readers will be able to learn something new. Gadi Taubenfeld is a professor and past dean of the School of Computer Science at the Interdisciplinary Center in Herzliya, Israel. He is an established authority in the area of concurrent and distributed computing and has published widely in leading journals and conferences. He authored the book Synchronization Algorithms and Concurrent Programming, published by Pearson Education. His primary research interests are in concurrent and distributed computing. Gadi was the head of the computer science division at Israel's Open University; member of technical staff at AT&T Bell Laboratories; consultant to AT&T Labs–Research; and a research scientist and lecturer at Yale University. Gadi served as the program committee chair of PODC 2013 and DISC 2008 and holds a Ph.D. in Computer Science from the Technion–Israel Institute of Technology.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值