zoukankan      html  css  js  c++  java
  • smbclient用法

    1,列出某个IP地址所提供的共享文件夹
    smbclient -L 198.168.0.1 -U username%password

    2,像FTP客户端一样使用smbclient
    smbclient //192.168.0.1/tmp -U username%password

    执行smbclient命令成功后,进入smbclient环境,出现提示符: smb:\>
    这里有许多命令和ftp命令相似,如cd 、lcd、get、megt、put、mput等。通过这些命令,我们可以访问远程主机的共享资源。

    3,直接一次性使用smbclient命令
    smbclient -c "ls" //192.168.0.1/tmp -U username%password

    smbclient //192.168.0.1/tmp -U username%password
    smb:\>ls
    功能一样的

    例,创建一个共享文件夹
    smbclient -c "mkdir share1" //192.168.0.1/tmp -U username%password
    如果用户共享//192.168.0.1/tmp的方式是只读的,会提示
    NT_STATUS_ACCESS_DENIED making remote directory \share1
    4,除了使用smbclient,还可以通过mount和smbcount挂载远程共享文件夹
    mount -t smbfs -o username=administrator,password=123456 //192.168.0.1/tmp /mnt/tmp
    smbmount //192.168.0.1/tmp /mnt/tmp -o username=administrator

    root@bt:~# smbclient -L 192.168.0.103 -U username%password
    Domain=[VIGAR-PC] OS=[Windows 7 Ultimate 7601 Service Pack 1] Server=[Windows 7 Ultimate 6.1]
    
        Sharename       Type      Comment
        ---------       ----      -------
        ADMIN$          Disk      远程管理
        C$              Disk      默认共享
        D$              Disk      默认共享
        E$              Disk      默认共享
        HP LaserJet 5200 Series PCL 5 Printer   2311
        IPC$            IPC       远程 IPC
        print$          Disk      打印机驱动程序
        software        Disk      
        username_打印    Printer   HP LaserJet 5200 Series PCL 5 (副本 1)
        zhuangxiu       Disk      
    session request to 192.168.0.103 failed (Called name not present)
    session request to 192 failed (Called name not present)
    session request to *SMBSERVER failed (Called name not present)
    NetBIOS over TCP disabled -- no workgroup available
    root@bt:~# smbclient //192.168.0.103/zhuangxiu -U username%password
    Domain=[VIGAR-PC] OS=[Windows 7 Ultimate 7601 Service Pack 1] Server=[Windows 7 Ultimate 6.1]
    smb: \> ls
      .                                   D        0  Thu May  3 10:21:20 2012
      ..                                  D        0  Thu May  3 10:21:20 2012
      北京初晨装饰清工辅料基础报价清单.xls     AR   125440  Wed Jun 22 13:06:25 2011
      复件 报价系统模板.xls                  A   341504  Fri Nov 11 11:39:14 2011
      新小区.xls                           A    90624  Sun Feb 12 15:53:37 2012
      园小区new.xlsx                       A    64512  Sat Feb 25 16:53:56 2012
  • 相关阅读:
    jianx vtritualbox 虚拟镜像的体积
    Warning:Configuration 'compile' is obsolete and has been replaced with 'implementation'. It will be
    厉害了,PS大神真的能改变世界!
    厉害了,他用PS不是P照片而是……
    清晰易懂!关于PS入门的超详细笔记!
    如何使用AE来制作烟雾粒子特效
    刷爆外网!中国天才设计师火到日本,30 张神仙海报看完真的服!
    大神你好,可以帮我P张图吗?
    拍照一分钟,修图两小时,PS大神是这样修片的!
    ui设计用什么软件
  • 原文地址:https://www.cnblogs.com/vigarbuaa/p/2958823.html
Copyright © 2011-2022 走看看