ubuntu12.04 64挂载其他ubuntu主机samba共享的文件夹

之前,写过一个http://blog.csdn.net/commshare/article/details/17020041 用来挂在其他linux主机的samba共享文件。

现在在新的ubuntu12.04的64位真机上,想挂在我在ubuntu32的虚拟机的samba共享文件夹。



遇到了这个问题:

root@Seagate64:/home/zhangbin/magicdev# mount -t smbfs -o iocharset=utf8,username=zhangbin,password=zhangbin//192.168.1.88/AlexHome /home/zhangbin/magicdev/u32magicdev/
Usage: mount -V                 : print version
       mount -h                 : print this help
       mount                    : list mounted filesystems
       mount -l                 : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
       mount -a [-t|-O] ...     : mount all stuff from /etc/fstab
       mount device             : mount device at the known place
       mount directory          : mount known device here
       mount -t type dev dir    : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
       mount --bind olddir newdir
or move a subtree:
       mount --move olddir newdir
One can change the type of mount containing the directory dir:
       mount --make-shared dir
       mount --make-slave dir
       mount --make-private dir
       mount --make-unbindable dir
One can change the type of all the mounts in a mount subtree
containing the directory dir:
       mount --make-rshared dir
       mount --make-rslave dir
       mount --make-rprivate dir
       mount --make-runbindable dir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using  -L label  or by uuid, using  -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say  man 8 mount .


命令有错误的地方。


起初,以为是不支持samba,于是:


root@Seagate64:/home/zhangbin/magicdev# apt-get install samba
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gir1.2-ubuntuoneui-3.0 libubuntuoneui-3.0-1 thunderbird-globalmenu
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  tdb-tools
Suggested packages:
  openbsd-inetd inet-superserver smbldap-tools ldb-tools ctdb
The following NEW packages will be installed:
  samba tdb-tools
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 8,063 kB of archives.
After this operation, 23.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://cn.archive.ubuntu.com/ubuntu/ precise-updates/main samba amd64 2:3.6.3-2ubuntu2.9 [8,040 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu/ precise/main tdb-tools amd64 1.2.9-4 [23.2 kB]
Fetched 8,063 kB in 7s (1,023 kB/s)                                            
Preconfiguring packages ...
Selecting previously unselected package samba.
(Reading database ... 178428 files and directories currently installed.)
Unpacking samba (from .../samba_2%3a3.6.3-2ubuntu2.9_amd64.deb) ...
Selecting previously unselected package tdb-tools.
Unpacking tdb-tools (from .../tdb-tools_1.2.9-4_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Processing triggers for ufw ...
Setting up samba (2:3.6.3-2ubuntu2.9) ...
Generating /etc/default/samba...
Importing account for nobody...ok
Importing account for zhangbin...ok
update-alternatives: using /usr/bin/smbstatus.samba3 to provide /usr/bin/smbstatus (smbstatus) in auto mode.
smbd start/running, process 13799
nmbd start/running, process 13834
Setting up tdb-tools (1.2.9-4) ...
update-alternatives: using /usr/bin/tdbbackup.tdbtools to provide /usr/bin/tdbbackup (tdbbackup) in auto mode.


还是不行。


原来是少了空格,没有识别到是把啥挂载。这个是两//,之前有个个空格的。

root@Seagate64:/home/zhangbin/magicdev# mount -t smbfs -o iocharset=utf8,username=zhangbin,password=zhangbin //192.168.1.88/AlexHome /home/zhangbin/magicdev/u32magicdev/
mount: unknown filesystem type 'smbfs'

这个问题,可以参考 http://www.51testing.com/html/00/130600-207951.html


说smbfs改为cifs了

于是,
root@Seagate64:/home/zhangbin/magicdev# mount -t cifs -o iocharset=utf8,username=zhangbin,password=zhangbin //192.168.1.88/AlexHome /home/zhangbin/magicdev/u32magicdev/
root@Seagate64:/home/zhangbin/magicdev# ls
u32magicdev
root@Seagate64:/home/zhangbin/magicdev# cd u32magicdev/
root@Seagate64:/home/zhangbin/magicdev/u32magicdev# ls

OK了。

不过我的1.88的虚拟机1g内存,感觉好慢啊,也可能是samba的问题吧。


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

等风来不如迎风去

你的鼓励是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值