Application of the md5sum program

Source: Internet
Author: User
Check whether the document has changed. 1. log on to the linux system as the root user. 2. create the md5testcd/mkdirmd5test3 folder under the root directory. enter the md5test Directory: cdmd5test4. create a file named myfile: touchmyfile5. use vi to edit the myfile file... check whether the document has changed
1. log on to linux as root
 
2. create the md5test folder in the root directory.
Cd/
Mkdir md5test
 
3. go to the md5test Directory: cd md5test
 
4. create a file named myfile: touch myfile
 
5. use vi to edit the myfile file and enter the following content:
 
Has anyone altered the contents of this file?
 
6. use md5sum to calculate the hash checksum.
 
[Root @ md5test] # md5sum myfile
 
7. run the md5sum command again and export the result to the myfile. md5 file.
 
[Root @ md5test] md5sum myfile> myfile. md5
 
8. open the myfile file, modify the file content (to minimize the changes), and save the changes.
 
9. run the md5sum command again to obtain different hash values.
 
10. run the cat command to view the content of myfile. md5: cat myfile. md5
 
11. compare the output results of step 1 and Step 2, and you should see the differences between the two.
Bytes ------------------------------------------------------------------------------------
12. enter the following command: md5sum/etc/passwd> passwd. md5 to create a file for the current/etc/passwd
Database hash check value
 
13. view the passwd. md5 File: cat passwd. md5
 
14. Add user hashtest and change password
 
Linux # useradd hashtest
 
Linux # passwd hashtest
 
Changing password for user hashtest
 
Nes UNIX password:
 
Retype new UNIX password:
 
Passwd: all authentication tokens updated successfully
 
15. run the md5sum-c passwd. md5 command. the-c parameter is used to compare the hash check value before and after database changes. you should be able to see the information about the check value changed.
 
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.