日期:2014-05-16  浏览次数:20656 次

linux下访问windows共享目录并挂载到linux本地文件夹

[simonsun@magic ~]$ smbclient -L //172.16.1.92/ -U administrator
Password:
Domain=[SERVER_T] OS=[Windows Server 2003 3790 Service Pack 2] Server=[Windows Server 2003 5.2]

??????? Sharename?????? Type????? Comment
??????? ---------?????? ----????? -------
??????? bak???????????? Disk?????
??????? C$????????????? Disk????? 默认共享
??????? H$????????????? Disk????? 默认共享
??????? www???????????? Disk?????
??????? F$????????????? Disk????? 默认共享
??????? IPC$??????????? IPC?????? 远程 IPC
??????? G$????????????? Disk????? 默认共享
??????? linuxdata?????? Disk?????
??????? ADMIN$????????? Disk????? 远程管理
??????? E$????????????? Disk????? 默认共享
??????? data??????????? Disk?????
session request to 172.16.1.92 failed (Called name not present)
session request to 172 failed (Called name not present)
Domain=[SERVER_T] OS=[Windows Server 2003 3790 Service Pack 2] Server=[Windows Server 2003 5.2]

??????? Server?????????????? Comment
??????? ---------??????????? -------

??????? Workgroup??????????? Master
??????? ---------??????????? -------
[simonsun@magic ~]$ smbclient //172.16.1.92/linuxdata -U administrator
Password:
Domain=[SERVER_T] OS=[Windows Server 2003 3790 Service Pack 2] Server=[Windows Server 2003 5.2]
smb: \> ?
?????????????? altname??????? archive??????? blocksize????? cancel????????
case_sensitive cd???????????? chmod????????? chown????????? close?????????
del??????????? dir??????????? du???????????? exit?????????? get???????????
getfacl??????? hardlink?????? help?????????? history??????? lcd???????????
link?????????? lock?????????? lowercase????? ls???????????? mask??????????
md???????????? mget?????????? mkdir????????? more?????????? mput??????????
newer????????? open?????????? posix????????? posix_open???? posix_mkdir???
posix_rmdir??? posix_unlink?? print????????? prompt???????? put???????????
pwd??????????? q????????????? queue????????? quit?????????? rd????????????
recurse??????? reget????????? rename???????? reput????????? rm????????????
rmdir????????? showacls?????? setmode??????? stat?????????? symlink???????
tar??????????? tarmode??????? translate????? unlock???????? volume????????
vuid?????????? wdel?????????? logon????????? listconnect??? showconnect???
!?????????????
smb: \> ls
? .?????????????????????????????????? D??????? 0? Fri Feb 26 14:06:28 2010
? ..????????????????????????????????? D??????? 0? Fri Feb 26 14:06:28 2010
? 10201_database_linux32.zip????????? A 668734007? Fri Feb 26 13:00:55 2010
? 20090225.dmp??????????????????????? A 120416256? Fri Feb 26 11:48:18 2010

??????????????? 49383 blocks of size 2097152. 14061 blocks available
smb: \> quit
[simonsun@magic ~]$ sudo mount -t cifs -o username=administrator //172.16.1.92/linuxdata /mnt/iso/
Password:
[simonsun@magic ~]$ ls /mnt/iso/
10201_database_linux32.zip? 20090225.dmp
[simonsun@magic ~]$