Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> 關於 Linux

smbclient 指令實戰:列出共享、互動式 FTP 模式、單指令操作、掛載遠端 SMB 分享

編輯:關於 Linux

1. 列出遠端共享資料夾

smbclient -L 192.168.0.1 -U username%password

2. 互動式模式(類 FTP)

smbclient //192.168.0.1/tmp -U username%password
smb: \> ls
smb: \> get file.txt
smb: \> put local.txt
...

3. 單指令非互動執行

smbclient -c "ls" //192.168.0.1/tmp -U username%password
smbclient -c "mkdir share1" //192.168.0.1/tmp -U username%password

若分區為唯讀會提示 NT_STATUS_ACCESS_DENIED。

4. 掛載遠端 SMB 分享至本地

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

結語

smbclient 提供列表、互動、單指令、掛載四大模式,完整覆蓋 SMB/CIFS 遠端檔案操作需求。

Copyright © Windows教程網 All Rights Reserved