2017年2月16日 星期四

[Smbclient] Connect to windows samba by using smbclient

Install package into archlinux
sudo pacman -S smbclient


If you understand which ip and folder is open for user to use.
Please type following command to connect.


smbclient -N //10.20.10.2/happy_Tftp


If you want to get file from remote samba.
Please type following command to get file from remote samba.
get xxx.txt


If you want to get directory from remote samba.
Please type following command to get directory from remote samba.

smb: \> recurse
smb: \> prompt
smb: \> mget trunk*

If you want to mount remote samba under /tmp.
Please type following command to mount remote samba. 
sudo mount -t cifs -o dir_mode=0755,file_mode=0755 //10.20.10.2/Tftp /tmp/a

Reference:

0 意見:

張貼留言