S
S
Sergey Brovko2017-10-11 20:46:34
linux
Sergey Brovko, 2017-10-11 20:46:34

How to check the integrity (checksums) of files when booting Linux?

Guys, tell me, there is a task from the management at all costs to check (verify) the integrity of the system files (a certain list of files) when the system boots. Those. there is a certain list of files and their checksums (MD5 or SHA-1 or other), when downloading, the integrity of the files should be verified (matching the checksums of the file and the standard), if everything is fine, then we load, if not, the server stops.
How much Google - did not find such a solution. Can you tell me

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry Shitskov, 2017-10-11
@cyber01

See nexthop
's answer Or

  1. Make a list of files and their checksums.
  2. Write a script that md5sumperforms checksum verification against this list using
  3. In case of mismatch of amounts - notification to the administrator and haltthe server
  4. Run script on server startup

T
TyzhSysAdmin, 2017-10-11
@POS_troi

sha1sum -c - <<EOF
a75....41e4774a  file1
9bc...864375f4e  file2
EOF

Well, where to shove it and how to process it depends on the specific system and task, stage.

K
ky0, 2017-10-11
@ky0

rsync can check checksum after loading, for example. What is the difficulty?

A
AVKor, 2017-10-11
@AVKor

It's not clear what the problem is. You create a list of the necessary files with their checksums and do a check on upload. The check will take from a few seconds of time (if the list is short) to probably several hours (if the list is long).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question