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. “无法在web服务器上启动调试,不是Debugger User组成员..."

    在使用VS.net2003开发asp.net项目时,有时候在你调试项目时,会提示”无法在web服务器上启动调试,不是Debugger User组成员..."这样一个错误信息.很是让人头疼,一 ...

  2. 轻松学习LINUX系列教程推出

    本系列多媒体教程已完成的博文: 1.轻松学习Linux之入门篇 http://chenguang.blog.51cto.com/350944/449214 2.轻松学习Linux之本地安装系统 (分区 ...

  3. XenServer创建镜像Storage

    Youtube:https://www.youtube.com/watch?v=-AK3nauKUw0 在安装了XenServer后,是没有镜像Storage的,我们可以在XenCenter中创建一个 ...

  4. 【PHPExcel实例】 php 导出 excel 实例

    CREATE TABLE `person` ( `) DEFAULT NULL, `name` ) DEFAULT NULL, `birthday` date DEFAULT NULL ) ENGIN ...

  5. [scrapy] scrapy 使用goose作为正文提取

    import scrapy from goose import Goose class Article(scrapy.Item): title = scrapy.Field() text = scra ...

  6. gdbserver静态编译

    redhat9 编译gdb server(静态编译)下载gdb-6.2a.tar:http://download.chinaunix.net/download.php?id=6680&Reso ...

  7. centos7 crontab管理

    crontab -l 当前用户的任务 crontab -e 编辑任务列表 crontab -r 删除当前用户的任务

  8. 【POJ 2409】 Let it Bead(置换、burnside引理)

    Let it Bead "Let it Bead" company is located upstairs at 700 Cannery Row in Monterey, CA. ...

  9. mtk预装apk 方案公司内置预装apk

    mtk预装apk 方案公司内置预装apk 韩梦飞沙  韩亚飞  313134555@qq.com  yue31313  han_meng_fei_sha == MTK 预知第三方的APK 流程_yua ...

  10. hdu 1864 最大报销额(背包)

    最大报销额 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submi ...