Guest User

Untitled

a guest
Dec 4th, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. windows mount メモ
  2.  
  3. # autofs インストール
  4.  
  5. ```
  6. dnf install autofs
  7. ```
  8.  
  9. centos 7はこっち
  10.  
  11. ```
  12. yum install autofs
  13. ```
  14.  
  15. # 設定
  16.  
  17. [/etc/auto.master]
  18.  
  19. に↓を追加
  20.  
  21. ```
  22. /mnt /etc/auto.mnt
  23. ```
  24.  
  25. [/etc/auto.mnt]
  26.  
  27. に↓を追加
  28.  
  29. ```
  30. (mount フォルダ名) -fstype=cifs,noperm,nolock,iocharset=utf8,file_mode=0777,dir_mode=0777,username=(ユーザ名),password=(パスワード) ://(windows の IP アドレス)/(共有名)
  31. ```
  32.  
  33. ```
  34. win -fstype=cifs,noperm,nolock,iocharset=utf8,file_mode=0777,dir_mode=0777,username=public,password=pass ://192.168.1.10/public
  35. ```
  36.  
  37. # windows
  38.  
  39. 公開するフォルダのプロパティから共有タブで公開設定
  40.  
  41. # autofs 起動
  42.  
  43. ```
  44. systemctl start autofs
  45. systemctl enable autofs
  46. ```
  47.  
  48. # 確認
  49.  
  50. ```
  51. ls /mnt/win
  52. ```
  53.  
  54. # 動かない時
  55.  
  56. mount コマンドで mount できるか試してみる
  57.  
  58. ```
  59. mount -t cifs //192.168.1.10/public /mnt2 -o username=***,password=***
  60. ```
  61.  
  62. # win10 の場合
  63.  
  64. 2017 年から windows で smb1 が無効に変更されたので、オプションに vers=2.0 もしくは 3.0 をつけないとマウントできなくなった
  65.  
  66. ```
  67. ...password=pass,vers=3.0 ://192....
  68. ```
  69.  
  70. ※ 新しい cifs-utils だと不要?
  71. centos7 (cifs-utils 6.2) は必要、 fedora 29 (cifs-utils 6.8) は不要
Add Comment
Please, Sign In to add comment