LinuxããWindowsã®å ±æãã©ã«ãããã¦ã³ããã
LinuxããWindowsã®å ±æãã©ã«ãããã¦ã³ãããã«ã¯
# mount -t cifs -o username=ã¦ã¼ã¶ã¼å,password=ãã¹ã¯ã¼ã //192.168.XXX.XXX/share /mnt/windows_share
ã¨ããããã«ããã°ããããããã ã¨Windowså´ã§åèµ·åãªã©ãè¡ããã¦ãã¾ãã¨æ¥ç¶ãåãã¦ãã¾ãã
ããã§ãLinuxå´ã§ã¯èµ·åæã«å ±æãã©ã«ãããã¦ã³ããããã¤å®æçã«ãã¦ã³ãç¶æ ã確èªãã¦ã¿ãã
ã¾ãã¯èµ·åæã«ãã¦ã³ãããããã« /etc/fstab 㫠以ä¸ã®è¨å®ã追è¨ããã
//192.168.XXX.XXX/share /mnt/windows_share cifs username=ã¦ã¼ã¶ã¼å,password=ãã¹ã¯ã¼ã 0 0
ç¶ãã¦ãå
±æãã©ã«ãã®ãã¦ã³ã確èªã¨ãåæããã¦ããå ´åã¯åãã¦ã³ãã試ã¿ãã·ã§ã«ã¹ã¯ãªãããä½æããã
ã¡ãªã¿ã«ããã¦ã³ãã®ç¢ºèªã¯ä¸è¬ã¦ã¼ã¶ã¼ã§ãã¦ã³ããã¤ã³ãã«é©å½ãªãã¡ã¤ã«ã touch ãã¦ã¿ã¦ãæåãããæ¥ç¶ããã¦ããã¨å¤æããã
å¾ã¯ãã®ã¹ã¯ãªããã root ã® cron ã§å®æçã«å®è¡ããããã«ãã¦ããã°OK
*/5 * * * * /root/mount_windows_share.sh 1> /dev/null