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. Python+Selenium 自动化实现实例-Link 捕捉元素的几种方法

    from selenium import webdriver driver = webdriver.Chrome() driver.get("http://www.baidu.com&quo ...

  2. AC日记——明明的烦恼 bzoj 1005

    1005 思路: prufer编码+组合数: 代码: #include <bits/stdc++.h> using namespace std; #define maxn 1005 #de ...

  3. Linux下文件属性

    在Linux下输入命令ls -l /etc/termcap /root/install.log,我们经常看到,这后面的一串内容具体是什么含义呢?[root@www ~]# ls -l /etc/ter ...

  4. jquery&javascript 跨域jsonp

    $(function(){ $.ajax({ type: "get", async: false, url: "http://flightQuery.com/jsonp/ ...

  5. thinkphp图片上传+validate表单验证+图片木马检测+缩略图生成

    目录 1.案例 1.1图片上传  1.2进行图片木马检测   1.3缩略图生成   1.4控制器中调用缩略图生成方法 1.案例 前言:在thinkphp框架的Thinkphp/Library/Thin ...

  6. 洛谷P3805 [模板]Manacher算法 [manacher]

    题目传送门 题目描述 给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度. 字符串长度为n 输入输出格式 输入格式: 一行小写英文字符a,b,c...y,z组成的字符 ...

  7. Standard - 多线程基本概念面试题待整理

    http://blog.csdn.net/dazhong159/article/details/7948327 http://z-jiankun.iteye.com/blog/1408471 http ...

  8. 20162312 2016-2017-2《Java程序设计》课程总结

    一.每周作业链接汇总 预备作业01 写的是有关老师和学生的关系: 预备作业02 如何做中学: 预备作业03 实验楼学习linux环境: 第一周作业 java入门,虚拟机等课前准备: 第二周作业 掌握J ...

  9. linux centos下安装docker

    1.在vm中装好好centos后,更新内核 运行docker需要内核版本为3.8或者更高的版本,内核必须支持一种合适的存储驱动(Drivice Mapper.AUFS.vfs.btrfs.ZFS),默 ...

  10. 从源码入手,一文带你读懂Spring AOP面向切面编程

    之前<零基础带你看Spring源码--IOC控制反转>详细讲了Spring容器的初始化和加载的原理,后面<你真的完全了解Java动态代理吗?看这篇就够了>介绍了下JDK的动态代 ...