歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> Linux服務器

linux系統訪問Windows文件共享

[root@localhost ~]# rpm -q samba-client

    samba-client-3.0.28-0.el5.8

    [root@localhost ~]# smbclient -L 192.168.0.7 -U Administrator

    Password:

    Domain=[BBC8D75B6BD34FE] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

            Sharename       Type      Comment
            ---------       ----      -------
            E{GetProperty(Content)}nbsp;             Disk      默認共享
            IPC{GetProperty(Content)}nbsp;           IPC       遠程 IPC
            D{GetProperty(Content)}nbsp;             Disk      默認共享
            print{GetProperty(Content)}nbsp;         Disk      打印機驅動程序
            SharedDocs      Disk
            ZJDocument      Disk
            臨時文件交流 Disk
            HPLaserJ        Printer   HP LaserJet 3200 Series PCL
            公共文檔    Disk
            本地磁盤 (G) Disk
            vs2008          Disk
            F{GetProperty(Content)}nbsp;             Disk      默認共享
            ADMIN{GetProperty(Content)}nbsp;         Disk      遠程管理
            C{GetProperty(Content)}nbsp;             Disk      默認共享
            soft    

        Disk

    session request to 192.168.0.7 failed (Called name not present)

    session request to 192 failed (Called name not present)

    Domain=[BBC8D75B6BD34FE] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

            Server               Comment
            ---------            -------
            Workgroup            Master
            ---------            -------

    [root@localhost ~]# ls

    anaconda-ks.cfg  install.log  install.log.syslog  mbox

    [root@localhost ~]# smbclient //192.168.0.7/soft -U Administrator

    Password:

    Domain=[BBC8D75B6BD34FE] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

    smb: \> ls
      .                                   D        0  Tue Jun 23 02:26:16 2009
      ..                                  D        0  Tue Jun 23 02:26:16 2009
      Adobe_Reader_9_1.exe                A 44910072  Wed May 27 13:43:46 2009
      cento2s5VM                          D        0  Wed Feb  4 09:14:29 2009
      CLSDS-3[1].1.doc                    A    80896  Tue Sep  4 20:55:56 2007
      Convert all SWFs to JPG.vbs         A     1045  Mon May  4 16:54:16 2009
      data              

                  D        0  Mon May 18 19:37:21 2009
      driver                              D        0  Fri Aug 29 00:27:16 2008
      ex070117.log                        A 1698385454  Thu Jan 18 08:00:02 2007
      ex070118.log                        A 1680195444  Fri Jan 19 08:00:02 2007
      ex070119.log                        A 1674275535  Sat Jan 20 08:00:02 2007
      MySQL5.1中文手冊.chm            A  4648580  Tue Jul  1 16:17:02 2008
      PureCodec20090126.exe               A 68565499  Tue Apr 28 15:40:57 2009
      system                              D        0  Tue Jun  9 02:33:40 2009
      t41                                 D        0  Sun Apr  6 11:57:00 2008
      TrueImageES-v9.1                    D        0  Tue Jun 23 02:25:42 2009
      vb60_full                           D        0  Tue Apr 14 13:37:45 2009
      zojiaoxpsp2.ISO                     A 2437634048  Fri Aug  3 18:17:25 2007
      新建 文本文檔.txt             A    

   94  Mon Dec 31 18:21:07 2007
      系統備份                        D        0  Mon May 18 19:40:18 2009
                    44994 blocks of size 4194304. 9890 blocks available

    smb: \> get MySQL5.1中文手冊.chm /mnt/MySQL5.1.chm

    getting file \MySQL5.1中文手冊.chm of size 4648580 as /mnt/MySQL5.1.chm (7681.3 kb/s) (average 7681.3 kb/s)

    smb: \> q

    [root@localhost ~]# cd /mnt

    [root@localhost mnt]# ls

    MySQL5.1.chm

    [root@localhost mnt]#

    [root@localhost /]# mount -t cifs -o username=baiyuan,password=baiyuan //192.168.0.7/soft /mnt

    [root@localhost /]# cd /mnt

    [root@localhost mnt]# ls

    Adobe_Reader_9_1.exe         cento2s5VM

     MySQL5.1中文手冊.chm   常規應用

    CLSDS-3[1].1.doc             PureCodec20090126.exe  技術開發

    Convert all SWFs to JPG.vbs  system                 播客安裝教linux.doc

    data                         t41                    新建 文本文檔.txt

    driver                       TrueImageES-v9.1       系統備份

    ex070117.log                 vb60_full

    ex070118.log                 zojiaoxpsp2.ISO

    [root@localhost mnt]# ll

Copyright © Linux教程網 All Rights Reserved