Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- windows mount メモ
- # autofs インストール
- ```
- dnf install autofs
- ```
- centos 7はこっち
- ```
- yum install autofs
- ```
- # 設定
- [/etc/auto.master]
- に↓を追加
- ```
- /mnt /etc/auto.mnt
- ```
- [/etc/auto.mnt]
- に↓を追加
- ```
- (mount フォルダ名) -fstype=cifs,noperm,nolock,iocharset=utf8,file_mode=0777,dir_mode=0777,username=(ユーザ名),password=(パスワード) ://(windows の IP アドレス)/(共有名)
- ```
- 例
- ```
- win -fstype=cifs,noperm,nolock,iocharset=utf8,file_mode=0777,dir_mode=0777,username=public,password=pass ://192.168.1.10/public
- ```
- # windows
- 公開するフォルダのプロパティから共有タブで公開設定
- # autofs 起動
- ```
- systemctl start autofs
- systemctl enable autofs
- ```
- # 確認
- ```
- ls /mnt/win
- ```
- # 動かない時
- mount コマンドで mount できるか試してみる
- ```
- mount -t cifs //192.168.1.10/public /mnt2 -o username=***,password=***
- ```
- # win10 の場合
- 2017 年から windows で smb1 が無効に変更されたので、オプションに vers=2.0 もしくは 3.0 をつけないとマウントできなくなった
- ```
- ...password=pass,vers=3.0 ://192....
- ```
- ※ 新しい cifs-utils だと不要?
- centos7 (cifs-utils 6.2) は必要、 fedora 29 (cifs-utils 6.8) は不要
Add Comment
Please, Sign In to add comment