ubuntu 挂载windows共享目录的方法
建立windows共享目录
右击要共享的文件夹-->属性-->高级共享-->添加用户-->添加完全控制权限
假设建立的共享地址为\\192.168.1.100\Linux
获取当前登录user的gid,uid
id username
建立挂载目录
mkdir /mnt/win
挂载目录
sudo mount -t cifs //192.168.1.100/Linux /mnt/win -o username=,password=,gid=,uid=
其中username,password为windows共享目录添加的账号和密码
如果出现错误:
mount error(): Permission denied
Refer to the mount.cifs() manual page (e.g. man mount.cifs)
则在挂载参数后面加上sec=ntlm,或者sec=ntlmssp
username=,password=,gid=,uid=,sec=ntlm
原因如下:
"sec" is the security mode and determines how passwords are encrypted between server and client ( even if you don't require passwords ). ntlm used to be the default which is why you never had to specify it discretely. Things have moved on however so the default is now ntlmssp. If you are accessing something which doesn't speak ntlmssp you have to override the new default with the old one. Most NAS devices use older technology so they often require ntlm. If you access an OSX samba share however it requires ntlmssp so before you had to specify that in the mount options but now you don't.
查看挂载目录
df -h
自动挂载共享目录
每次启动都来挂载很麻烦?可以让系统每次启动时就自动挂载
编辑/etc/fstab
sudo vi /etc/fstab
在最后添加一行
//192.168.1.100/Linux /mnt/win cifs username=,password=,gid=,uid=,auto 0 0
重启一下看看
sudo shutdown -r
df -h
成功了~
ubuntu 挂载windows共享目录的方法的更多相关文章
- Linux访问Windows共享目录的方法——smbclient
之前写过Ubuntu访问Windows共享目录,里面主要介绍如何在GUI上访问windows共享目录. 本文侧重于整理通过命令行访问的方法. 先确保smbclient.ubuntu下可以直接运行下面命 ...
- linux系统下挂载windows共享目录
在工作中有时我们需要在linux上挂载windows共享目录.首先我们需要学会在linux上查看windows共享了那些目录.查看操作需要安装samba-client. [root@ ~]# yum ...
- Ubuntu访问Windows共享目录
你可以选择目录挂载的形式,也可以选择直接使用图形界面的形式. 下面直接在文件浏览器中打开windows共享目录. 1 安装samba sudo apt-get install samba 2 打开一个 ...
- Linux开发环境搭建三 使用mount -t cifs 挂载windows共享目录方法与问题解决
转载链接:https://blog.csdn.net/fuyuande/article/details/82915800 嵌入式开发通常是在linux环境下编译,windows下开发,这就需要在lin ...
- Linux挂载Windows共享目录
在windows中设置共享目录并添加权限用户 把Window系统的文件共享挂载到linux centos 目录下的方法步骤: 1.先在windows下面共享需要挂载的目录. 2.确保linux与win ...
- 本地虚拟机挂载windows共享目录搭建开发环境
关闭防火墙(本地环境 直接关掉即可)service iptables stop检查是否安装了需要的samba软件包rpm –q samba如果没安装yum install samba system-c ...
- Centos7挂载windows共享目录
将windows的共享目录挂载到Centos7 查看是否有mount.cifs命令,如果没有,在线安装 [root@dropbox-bak01 ~]# yum install cifs-utils - ...
- centos 挂载windows共享目录
su (获取root权限) yum install samba 安装samba (其实我们只用到samba里面的winbind以便我们能够用windows机器的名称找到该机器的网络地址,在下面叙述的过 ...
- CentOS虚拟机挂载Windows共享目录
Windows文件共享使用了SMB协议(又称CIFS协议),该协议主要提供了文件共享和打印共享功能,分别使用TCP 139和445端口.UNIX.Linux系统提供了该协议的开源实现samba.为了方 ...
随机推荐
- 数据库基础知识(1)--数据库php连接
关系数据库的常用基本术语 数据data 数据库database 数据库管理系统dbms 表(数据表)table 字段field,列column 行row,记录record 数据库操作的基本模式(流程 ...
- Error:(1, 0) Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See http://b.android.com/9574
这个一般是因为你打开的项目所在的目录存在中文,把项目换到全英文目录下就没问题了
- HDU-2222 Keywords Search(AC自动机--模板题)
题目大意:统计一共出现了多少次模板串. 题目分析:AC自动机的模板题.不过这题有坑,相同的模板串不能只算一次. 代码如下: # include<iostream> # include< ...
- Github 笔记
在本地创建并切换 git checkout -b your_branch_name 把本地分支的修改提交到远端的分支上 git push origin local_branch_name:remote ...
- python 元组操作
关于元组的常用操作,请参考:http://www.runoob.com/python/python-tuples.html 元组的元素不可修改 ,元组的元素的元素可修改 count(self,valu ...
- 各种Linux发行版本优缺点对比[转]
转自:http://www.zzbeidaqingniao.com/linux/20100127/1495.html linux最早由Linus Benedict Torvalds在1991年开始编写 ...
- linux 下 文件权限和文件主
文件与文件夹的权限和所有者 1.chmod -R 755 file 777 含义与来源: 777含义:分别为:所有者.同组用户.其他用户 7的来源:文件有三种操作模式:读4.写2.执行1,分别值为42 ...
- ADF_Controller系列5_通过绑定TasksFlow创建Train
2015-02-14 Created By BaoXinjian
- @Override报错
仔细看了下项目 , 是因为有人把project的信息传上来了 , 使用编译的JDK变成了1.5(难道是因为他的1.8的版本我没有 ?) , 右键项目, 选property , 把compiler变成1 ...
- FW开发代码规范---小任性(2)
三.空行 (1)在每个函数.结构体.枚举定义结束之后都要加空行. 在一个函数体内,逻辑密切相关的语句之间不加空行,其它地方应加空行分隔. struct st1 { - }; // 空行 enum { ...