0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

# KodeKloud 100日間チャレンジ:最初の4日間で学んだこと

0
Posted at

kodekloud-days-1-4.png

概要

KodeKloudの100 Days of DevOpsチャレンジに挑戦中です。
この記事では、最初の4日間で学んだLinux管理の実践的な教訓をシェアします。

主な学習内容

Day 1: 非対話型ユーザーの作成

sudo useradd -s /usr/sbin/nologin username
getent passwd username

学んだこと: 必ず正しいホストで作業していることを確認する(2回も間違えました...)

Day 2: 期限付きユーザーアカウント

sudo useradd anita -e 2023-06-05
chage -l anita

学んだこと: 一時的なアクセス管理の重要性

Day 3: SSH root ログインの無効化

手動で3台のサーバーを設定するのが苦痛だったので、自動化しました:

for server in app1 app2 app3; do
    ssh $server "sudo sed -i 's/#PermitRootLogin no/PermitRootLogin no/' /etc/ssh/sshd_config"
done

学んだこと: 同じ作業を2回以上やるなら、スクリプト化する

Day 4: ファイル権限管理

chmod 755 /tmp/xfusioncorp.sh

権限の理解: 755 = オーナーはフルアクセス、他はread+execute

詳細な記事はこちら

完全な記事(より詳細な解説、失敗談、実践的なヒント)は私のブログで公開しています:

👉 Full Article (English)

Note: ブログはより口語的でカジュアルなトーンで書かれています

タグ

#DevOps #Linux #KodeKloud #100DaysOfCode #インフラ

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?