linux小技巧
1、md5sum检测文件变化
2、 grub加密及破解
md5sum检测文件变化
# md5sum /etc/passwd > /tmp/md5passwd # md5sum -c /tmp/md5passwd /etc/passwd: OK # useradd test # md5sum -c /tmp/md5passwd /etc/passwd: FAILED md5sum: WARNING: 1 of 1 computed checksum did NOT match
grub加密及破解(遗忘root密码只需进单用户模式更改即可) 生成加密密码 # grub-md5-crypt Password: Retype password: $1$ijJgG/$UzCPEaI3hVJaCNg4rAWS11 将密码文件加到/etc/grub.conf password --md5 $1$ijJgG/$UzCPEaI3hVJaCNg4rAWS11 title CentOS 6 (2.6.32-573.el6.x86_64) 破解需要用rescure bash-4.1#chroot /mnt/sysimage sh-4.1#vi /etc/grub.conf 去除密文 sh-4.1#exit bash-4.1#reboot