smbmount & smbclient

1.先用smbclient檢查遠端電腦可分享的資源,連接後輸入root的密碼

root@ubuntu9-luckfox:/workspace/android-ndk-1.6_r1/usr/config# smbclient -L 192.168.1.3
Enter root's password:

Domain=[LUCKFOX-WINXP0] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

    Sharename       Type      Comment
    ---------       ----      -------
    IPC$            IPC       遠端 IPC
    D$              Disk      預設共用
    mp3             Disk     
    ADMIN$          Disk      遠端管理
    C$              Disk      預設共用
session request to 192.168.1.3 failed (Called name not present)
session request to 192 failed (Called name not present)
Domain=[LUCKFOX-WINXP0] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

    Server               Comment
    ---------            -------

    Workgroup            Master
    ---------            -------
root@ubuntu9-luckfox:/#


2.使用smbmount 將遠端分享資料夾mount到local端來,此時輸入的密碼為遠端電腦的密碼(如果遠端電腦沒有預設帳號的話)

root@ubuntu9-luckfox:/# smbmount //192.168.1.3/mp3 /mnt
Password:

3.使用smbnmount取消mount
root@ubuntu9-luckfox:/# smbumount  /mnt

你可能感兴趣的:(Windows,Android,OS,C,C++)