LoginSignup
0
1

More than 5 years have passed since last update.

centos6にsamba

Last updated at Posted at 2018-01-12

centos6にsambaをインストール

sambaインストール

yum install samba samba-client samba-common -y

共有フォルダの作成

mkdir [共有フォルダのパス]
chmod -R 0777 [共有フォルダのパス]
chown -R nobody:nobody [共有フォルダのパス]

設定ファイルを編集

cp smb.conf smb.conf.org
vi smb.conf
[Share]
#共有させるフォルダ
path = [共有フォルダのパス]
#マイネットワークに表示させるか否か
browsable =yes
#書き込み可能かどうか
writable = yes
#ゲストユーザのログインが可能かどうか
guest ok = yes
#読込みのみとするか
read only = no

samba起動

/etc/rc.d/init.d/smb start
/etc/rc.d/init.d/nmb start

Sambaを自動起動するように設定

chkconfig smb on
chkconfig nmb on

共有フォルダにアクセスできるユーザーを設定
(既存のユーザーをSambaサーバーアクセス用ユーザーとする)

smbpasswd -a [ユーザー名]

centos7は 'pdbedit' というものになるらしい

上記を行いcentos6の共有フォルダをcentos6からマウントすると
以下のエラーが発生
謎。

mount -t cifs //[ipアドレス]/[共有フォルダ] [マウント先] -o user=[ ユーザーID],password=[パスワード],uid=apache,gid=apache,file_mode=0777,dir_mode=0777

mount error(112): Host is down
Refr to the mount.cifs(8) manual page (e.g. man mount.cifs)
0
1
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
1