smbclient -L //192.168.30.100 Enter WORKGROUP\GUEST's password:
Sharename TypeComment --------- ---- ------- print$ Disk Printer Drivers DATA_I_S Disk vvd_samba_yes Disk IPC$ IPC IPC Service (Samba 4.9.5-Debian) SMB1 disabled -- no workgroup available
以用户身份查看共享的资源文件
1 2 3 4 5 6 7 8 9 10
/var/www/html# smbclient -L //192.168.30.100 -U samba Enter WORKGROUP\samba's password:
Sharename Type Comment -------------------- print$ Disk Printer Drivers DATA_I_S Disk vvd_samba_yes Disk IPC$ IPC IPC Service (Samba 4.9.5-Debian) samba Disk Home Directories
在上一步查看到可用的资源后,通过使用该命令直接进入要使用的资源目录内部。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
smbclient //192.168.30.100/DATA_I_S -U samba Enter WORKGROUP\samba's password: Try "help" to get a list of possible commands. smb: \> ls . D 0 Thu Jan 6 15:34:19 2022 .. D 0 Tue Jan 4 15:50:00 2022 omv-vvd N 0 Thu Jan 6 02:14:49 2022 test-vvd N 0 Thu Jan 6 03:53:21 2022 test-1 N 0 Thu Jan 6 14:58:02 2022 tt N 0 Thu Jan 6 15:18:07 2022 a D 0 Thu Jan 6 15:28:15 2022 vvv N 0 Thu Jan 6 15:34:10 2022 ttt N 0 Thu Jan 6 15:34:19 2022
524032000 blocks of size 1024. 520345292 blocks available smb: \> exit
挂载资源文件夹到本地
1
mount //192.168.30.100/DATA_I_S /mnt -o username=samba,password=123456