EnglishFrenchSpanish

OnWorks favicon

st_snapshot - Online in the Cloud

Run st_snapshot in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command st_snapshot that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


st_snapshot - calculate checksum and stat ownership and permissions of files

SYNOPSIS


ST_SUM=sha256sum st_snapshot patterns homepatterns

DESCRIPTION


st_snapshot calculates checksums and stats ownership and permissions of critical system
files.

This script is typically run in either root-mode or public-mode. Running this script in
root-mode requires root priviliges. One is adviced to set up a dedicated user account for
running this script in public mode.

In root-mode, the files snapshot_root.list and snapshot_root.homelist are typically passed
as arguments. These pattern files are read by the script and contain names of files and
directories; listing a directory in such a pattern file is equivalent to listing all files
which live in the directorytree with this directory as root.

snapshot_root.list could e.g. read

# snapshot_root.list - files and directories we wanna get
# monitored: we wanna get a note once these files, or any file
# under these directories, gets created, gets rm-ed, gets
# permissions or contents changed. these notices will not
# include the possibly secret contents of these files
#
# this file gets read by st_systraq
/etc/group
/etc/gshadow
/etc/hosts.allow
/etc/hosts.deny
/etc/hosts.equiv
/etc/lilo.conf
/etc/passwd
/etc/postfix/server.pem
/etc/shadow
/etc/skel
/etc/ssh

Equivalent files snapshot_pub.list and snapshot_pub.homelist should be on the system.
These files should contain all worldreadable to be monitored files. This allows for
running this script as root only in those cases where it's needed: when reading files,
readable for root only.

The homelist files contain files and directories which should get monitored for every
homedirectory on the system. snapshot_pub.homelist could e.g. contain:

.profile
.cshrc
.tcshrc
.login
.logout
.bash_profile
.bashrc
.exrc
.nexrc

As a special case, when the environment variable ST_OPHOMES is set to a non-empty string
(typically when running in public mode), we stat the permissions on all homedirectories
themselves.

The produced snapshot is printed to stdout. The output when running in public mode could
look like:

# ownership and permissions of homedirs
drwxr-xr-x root root /bin
drwxr-xr-x root root /dev
drwxr-sr-x root staff /home
drwxr-sr-x joostvb joostvb /home/joostvb
drwxr-xr-x root root /usr/sbin
drwxr-xr-x root root /var
# sha256sum of critical pub files
4d3cd13d6dbc10e2e3ccb9477cbc9eb9b76302454c276d5771ae0b10a5fbb4d2 /home/joostvb/.ssh/id_rsa.pub
eb8d83e0246f761a21bdfb13a03fac634ed7c3b7dde4c2efddd7b2838d32596f /var/qmail/alias/.bashrc
4e371f9a11f5a2464d3d5c952e58e24f73b377d33767ed93b2082fcb59a647fe /etc/zlogin
# ownership and permissions of critical pub files
-rw-rw-r-- joostvb joostvb /home/joostvb/.ssh/id_rsa.pub
-rw-r--r-- joostvb joostvb /home/joostvb/.ssh/authorized_keys

ENVIRONMENT


ST_OPHOMES - non-empty in case permissions on all homedirectories should be printed

ST_SUM - command for calculating file checksums. E.g. sha256sum, sha512sum, sha384sum,
sha224sum or sha1sum.

Use st_snapshot online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Osu!
    Osu!
    Osu! is a simple rhythm game with a well
    thought out learning curve for players
    of all skill levels. One of the great
    aspects of Osu! is that it is
    community-dr...
    Download Osu!
  • 2
    LIBPNG: PNG reference library
    LIBPNG: PNG reference library
    Reference library for supporting the
    Portable Network Graphics (PNG) format.
    Audience: Developers. Programming
    Language: C. This is an application that
    can also...
    Download LIBPNG: PNG reference library
  • 3
    Metal detector based on  RP2040
    Metal detector based on RP2040
    Based on Raspberry Pi Pico board, this
    metal detector is included in pulse
    induction metal detectors category, with
    well known advantages and disadvantages.
    RP...
    Download Metal detector based on RP2040
  • 4
    PAC Manager
    PAC Manager
    PAC is a Perl/GTK replacement for
    SecureCRT/Putty/etc (linux
    ssh/telnet/... gui)... It provides a GUI
    to configure connections: users,
    passwords, EXPECT regula...
    Download PAC Manager
  • 5
    GeoServer
    GeoServer
    GeoServer is an open-source software
    server written in Java that allows users
    to share and edit geospatial data.
    Designed for interoperability, it
    publishes da...
    Download GeoServer
  • 6
    Firefly III
    Firefly III
    A free and open-source personal finance
    manager. Firefly III features a
    double-entry bookkeeping system. You can
    quickly enter and organize your
    transactions i...
    Download Firefly III
  • More »

Linux commands

Ad