業務用エアコン関連の技術情報、エラーコード、環境問題対策に関する別サイト「エアコンの安全な修理・適切なフロン回収」

nuy

Almalinux9.2

AlmaLinux9.2 ; Suricata , Tripwire , Chkrootkitインストール

Suricata インストールSURICATA IDS/IPSはネットワーク上の通信を監視し、不審なトラフィックを検知するオープンソースのIDSです。基本的な仕組みはシグネチャ型であるため、あらかじめ設定した不正な通信を検知できます。また、Suricataは検知だけでなく防御も行えることが特徴です。Suricata インストールSURICATA IDS/IPSはネットワーク上の通信を監視し、不審なトラフィックを検知するオープンソースのIDSです。基本的な仕組みはシグネチャ型であるため、あらかじめ設定した不正な通信を検知できます。また、Suricataは検知だけでなく防御も行えることが特徴です。Tripwire インストール1.ダウンロード、インストールChkrootkit インストール①chkrootkit をダウンロード、インストール
Almalinux9.2

AlmaLinux9.2 ; システムのバックアップとレストア

1.Webサイトデータバックアップ/var/www/html配下のバックアップ①バックアップスクリプトファイルの作成2.MySQLデータベースバックアップ①バックアップスクリプトファイルの作成3.html配下のバックアップファイルの復元① HTML バックアップファイルを「/(ルート)」ディレクトリへ格納4.Mysqlバックアップファイルの復元①DB バックアップファイルを任意のディレクトリに保存し、(例では「/var/www/backup/db_bak」ディレクトリです)データを解凍
その他

初期設定Ⅱ SSHサービス・ファイアウォール設定

Debian10インストール後の初期設定その2として次のことを設定します。・SSHサービスのセキュリティ設定・ファイアウォールとしてUFWの設定1. SSHサービスのセキュリティ設定SSHサービスはデフォルトでrootユーザーのログインを許可しています。rootユーザーはユーザー名が既に判明しているためパスワードが判明すると、管理者権限でサーバーへログイン出来るため、これを拒否する設定を行います1.1 一般ユーザーの作成Debianのインストール時に一般ユーザーを作成している場合は、本手順は不要です。サー バーに作成されているユーザーがrootのみの場合、SSHによるリモートログインが出来なくなりますので、OSのインストール時にユーザーを作成していない場合、事前にユーザーを作成する必要があります。OSのインストール時にユーザーを作成している場合は、本手順は不要です。ユーザーの作成は"useradd"コマンドで行います。"-m"オプションでホームディレクトリの作成、"-p"オプションでパスワードを指定します。
その他

初期設定Ⅲ その他設定(SU、リポジトリ ミラー、locate、タイムゾーンの設定)

Debianインストール後すべき初期設定のうち、今回は次の項目を設定する。・suできるユーザーを制限する・Debian リポジトリ ミラー設定編集・ locateコマンドを利用できるようにする・ロケールの設定・タイムゾーンの設定・システムパッケージのアップデート1.  suできるユーザーを制限するDebianではデフォルト設定の場合"su"コマンドでどのユーザーでもrootユーザーに移行することができます。複数のユーザーがサーバーに作成されている場合、どれか一つでもユーザーのログイン情報が分かってしまうと不正アクセス後にsuコマンドでrootユーザー権限を奪取されてしまうため、できる限りsuコマンドを実行できるユーザーを制限します。wheelグループに属するユーザーのみにsuを実行できる権限を与えることができるようにします。
LinuxTips(RedHat系)

ユーザーの設定を変更する

ユーザーの設定を変更するユーザーには予め、UIDやGID、ホームディレクトリなどが指定されている。これらの情報を後から変...
LinuxTips(RedHat系)

ユーザーを削除する

ユーザーを削除するユーザーを削除するコマンドはuserdel。このコマンドを実行すると、ユーザー情報は削除されるが、ユー...
LinuxTips(RedHat系)

一般ユーザーでroot権限のコマンドを実行する

一般ユーザーでroot権限のコマンドを実行する一般ユーザーでログインの時、root権限のコマンドを使用する場合は、sud...
LinuxTips(RedHat系)

他のユーザにファイルを見せないようにする

他のユーザにファイルを見せないようにするLinuxでは、他のユーザにファイルを見せないようにすることができる。chmod...
LinuxTips(RedHat系)

ユーザーを作成する

To create and add a new user, use the "useradd" commandBy specifying a user name as an argument to the command, a user will be created. The user directory will be created under the /home directory, and the group name will be the same as the user name.
LinuxTips(RedHat系)

グループを作成する

To create and add a new group, use the "groupadd" command.Information about groups is described in /etc/group and can be edited, but it is better to edit the group information with the vigr command instead of directly editing the "/etc/group" file.
LinuxTips(RedHat系)

ユーザーが所属しているグループを確認する

Check the group in /etc/passwd and /etc/group (check the gid)Users always belong to a group, and the group described in the /etc/passwd and /etc/group files is the primary group.The gid (group ID) is stored in the /etc/passwd and /etc/group files
LinuxTips(RedHat系)

ユーザを複数のグループに所属させる

Group information in Linux is stored in the "/etc/group" file, which has the following notationtama:x:500:From left to right, tama is the group name, X is the password (when it says X, it is written in the /etc/gshadow file). 500 is the GID.To make a user belong to multiple groups, edit the "/etc/group" file, but it is convenient to use the vigr command to edit the "/etc/group" file. (The operation method is the same as vi)
LinuxTips(RedHat系)

ユーザーのログイン履歴を確認する

The user's login history will be output to the /var/run/utmp and /var/log/wtmp files.This file, like the /var/log/lastlog and /var/log/btmp files, is a binary file, so it cannot be displayed by the less, cat, or tail commands.To display it, use the dedicated /usr/bin/last command.
LinuxTips(RedHat系)

ユーザーの所属グループを表示する

To check which group a particular user belongs to, use the groups command.If you run the command with no arguments, the group to which the user who executed the command belongs will be displayed.If you specify the name of the user whose group you want to display as an argument, the group to which the user belongs will be displayed.
LinuxTips(RedHat系)

グループを追加・削除する

●Add a groupTo create a group, use the groupadd command.When executing this command, specify the group name to be added as an argument. You will need root privileges to run this command.