LoginSignup
5
6

More than 1 year has passed since last update.

Ubuntu 22.04にsambaをインストールしてファイルサーバにする(Linuxユーザーのホームディレクトリを共有)

Posted at

aptパッケージをインストール

sudo apt update
sudo apt upgrade

Sambaをインストール

sudo apt install -y samba

設定ファイル編集

設定ファイルをバックアップ

cd /etc/samba/
sudo cp -a smb.conf smb.conf.default

設定ファイル編集

sudo vim smb.conf

smb.confの末尾に下記追加

[{ユーザー名}]
path = /home/{ユーザー名}/
browsable = yes
writable = yes
guest ok = no
read only = no

Linuxユーザーにsambaパスワードを設定

sudo smbpasswd -a username {ユーザー名}
New SMB password:
Retype new SMB password:

と聞かれるので、共有フォルダへアクセスる際のパスワードを設定します。

共有フォルダへアクセスる

\\{samba接続先IPアドレス}\{ユーザー名}

へアクセスし、ユーザー名とパスワードを聞かれたら、ユーザー名と、smbpasswdで設定したパスワードを入力します。

5
6
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
5
6