mount -t cifs -o username="共享用户",password="密码" //ip/sharing_folder /mountpoint

[转]  如何在Windows和Linux中共享文件?samba也许是个不错的选择。但是我用的CentOS5中若用smbfs就是一个“Wrong fs type”。仔细查找了相关资料,找出几个解决方法:
   1 mount -o username=your_name,password=your_password //server/share_folder /mount_point
   2 mount -t cifs username=your_name,password=your_password //server/share_folder /mount_point
   这两种方法本质都一样,但要注意your_name用户必须对share_folder拥有完全操作的权限,当然若要只读甚至随便乱写个用户名密码都可 以。
   3 写到/etc/fstab文件中,在该文件最后添加一行:
   //server/share_folder /mount_point  cifs username,password,rw 
   这样还是有个缺点,即用户名和密码都以明文的方式暴露了,还可以这样:
   4 编辑/etc/fstab,按如下格式添加:
   //server/share_folder /mount_point  cifs credential=/root/credential
     而/root/credential中内容如下:
     useername=your_name
     password=your_password
   但是还有个问题,普通用户是无权使用mount的,
   5 使用sudo
   6 对mount.cifs添加suid。

Mount CIFS的更多相关文章

  1. mount CIFS return ERR -12 and report Cannot allocate memory

    When I mount CIFS on board, it encountered error as below: # mount -t cifs //192.168.1.28/98share /t ...

  2. mount.cifs permission denied

    [root@dev ~]# mount.cifs //192.168.9.155/APP /mnt/APP/ -o user=administrator,pass=dsff#$TTT 在检查帐号密码权 ...

  3. mount.cifs Windows共享目录权限755问题

    umount -l /usr/local/tomcat7/webapps/dsideal_yy/html/down mount -t cifs -o rw,dir_mode=,file_mode=,s ...

  4. 挂载cifs报错mount error(13): Permission denied(域账号访问时报错)

    Linux挂载Windows共享时,报以下错误: mount error(13): Permission deniedRefer to the mount.cifs(8) manual page (e ...

  5. Linux开发环境搭建三 使用mount -t cifs 挂载windows共享目录方法与问题解决

    转载链接:https://blog.csdn.net/fuyuande/article/details/82915800 嵌入式开发通常是在linux环境下编译,windows下开发,这就需要在lin ...

  6. mount常用挂载命令

    挂接命令(mount) 首先,介绍一下挂接(mount)命令的使用方法,mount命令参数非常多,这里主要讲一下今天我们要用到的. 命令格式: mount [-t vfstype] [-o optio ...

  7. 在Linux上挂载Windows共享文件夹,如何开机自动挂载(mount)?

    按照一般的思路,我们先将文件夹挂载上去,命令如下: mkdir /mnt/share_software mount //192.9.206.43/share_software /mnt/share_s ...

  8. Redhat linux 挂载命令mount

    命令格式: mount [-t vfstype] [-o options] device dir 其中: 1.-t vfstype 指定文件系统的类型,通常不必指定.mount 会自动选择正确的类型. ...

  9. How To mount/Browse Windows Shares【在linux{centos}上挂载、浏览window共享】

    How to mount remote Windows shares Contents Required packages Basic method Better Method Even-better ...

随机推荐

  1. opencv的使用——经典大坑

    视频或相机中读入的帧数不对,或有空帧 image check from cap or video: you must check wether each frame is not empty when ...

  2. AC日记——色板游戏 洛谷 P1558

    色板游戏 思路: sb题: 代码: #include <bits/stdc++.h> using namespace std; #define maxn 100005 struct Tre ...

  3. AC日记——Sagheer and Crossroads codeforces 812a

    812A - Sagheer and Crossroads 思路: 模拟: 代码: #include <cstdio> #include <cstring> #include ...

  4. 前端组件化-Web Components【转】

    以下全部转自:http://www.cnblogs.com/pqjwyn/p/7401918.html 前端组件化的痛点在前端组件化横行的今天,确实极大的提升了开发效率.不过有一个问题不得不被重视,拟 ...

  5. 六十六 aiohttp

    asyncio可以实现单线程并发IO操作.如果仅用在客户端,发挥的威力不大.如果把asyncio用在服务器端,例如Web服务器,由于HTTP连接就是IO操作,因此可以用单线程+coroutine实现多 ...

  6. iwebshop 自动给css js链接加版本信息

    lib/core/tag_class.php case 'theme:': $path = $matches[4]; $exts = strtolower(substr($matches[4], st ...

  7. 洛谷P3385 [模板]负环 [SPFA]

    题目传送门 题目描述 暴力枚举/SPFA/Bellman-ford/奇怪的贪心/超神搜索 输入输出格式 输入格式: 第一行一个正整数T表示数据组数,对于每组数据: 第一行两个正整数N M,表示图有N个 ...

  8. jdbc 回顾

    JDBC实现基本的CRUD示例 private static void insertTest() throws SQLException { String dbURL = "jdbc:mys ...

  9. zoj 1375||poj 1230(贪心)

    Pass-Muraille Time Limit: 2 Seconds      Memory Limit: 65536 KB In modern day magic shows, passing t ...

  10. C++-STL-(map用法)

    http://blog.csdn.net/sunshinewave/article/details/8067862