ubuntu14.04挂载网络盘

前几天装了个ubuntu14.04用起来感觉不错,也遇到些问题,这里记录一下。

想把服务器上的smb盘共享成像window一样的碰盘映射,以前的做法是

smbmount //sambaserver/d /mnt/d -o username=aaa,password=bbb

今天去试了一下,

----------------------------------------------------------------------------------------------

 

joey@joey-X240:~$ sudo apt-get install smbfs
[sudo] password for joey:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
现在没有可用的软件包 smbfs,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到
可是下列软件包取代了它:
  cifs-utils

E: 软件包 smbfs 没有可供安装的候选者
joey@joey-X240:~$
-------------------------------------------------------------------------------------------------

 

随即sudo apt-get install cifs-utils

然后查了一下,原来是

Ubuntu14.04没有smbfs,所以smbmount命令也用不了了,现在可以使用mount.cifs命令来挂载。

 

Usage:  mount.cifs <remotetarget> <dir> -o <options>

Mount the remote target, specified as a UNC name, to a local directory.

Options:
    user=<arg>
    pass=<arg>
    dom=<arg>

Less commonly used options:
    credentials=<filename>,guest,perm,noperm,setuids,nosetuids,rw,ro,
    sep=<char>,iocharset=<codepage>,suid,nosuid,exec,noexec,serverino,
    mapchars,nomapchars,nolock,servernetbiosname=<SRV_RFC1001NAME>
    directio,nounix,cifsacl,sec=<authentication mechanism>,sign,fsc

Options not needed for servers supporting CIFS Unix extensions
    (e.g. unneeded for mounts to most Samba versions):
    uid=<uid>,gid=<gid>,dir_mode=<mode>,file_mode=<mode>,sfu

Rarely used options:
    port=<tcpport>,rsize=<size>,wsize=<size>,unc=<unc_name>,ip=<ip_address>,
    dev,nodev,nouser_xattr,netbiosname=<OUR_RFC1001NAME>,hard,soft,intr,
    nointr,ignorecase,noposixpaths,noacl,prefixpath=<path>,nobrl

Options are described in more detail in the manual page
    man 8 mount.cifs

To display the version number of the mount helper:
    mount.cifs -V
 

例如:mount.cifs //192.168.0.244/joey  /home/joey/serverfolder -o user=xxxxxxx

到此,已经可以看到serverfolder里的东西了,但是文件夹旁边有个小锁,没有写权限啊。

没关系,写一下

sudo mount -t cifs -o rw,file_mode=775,dir_mode=777,uid=1000,gid=1000,username=xxxx,pass=xxxx,iocharset=utf8,rw,dir_mode=0777,file_mode=0777 //192.168.0.244/joey /home/joey/serverfile
不知道UID ,PID ?

这里是本机的哦

sudo gedit /etc/passwd 查之。

例如:joey:x:1000:1000:joey,,,:/home/joey:/bin/bash


现在可以像本地盘一样,随心地操作了。

 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值