The net command may be used to get information from a Windows PC. Below is an example. I am reading the time from a Windows 7 Ultimate PC.
[email protected]:/home/homer# net time -I 192.168.100.5
Fri Jul 11 11:22:32 2014
This command shows the network shares that my Windows 7 Ultimate installation has, I am connected to the shares on my Debian PC.
[email protected]:/home/homer# smbtree -S 192.168.100.5
Enter root's password:
\\DEBIAN debian server
Here is how to change a remote Windows PC password using Samba.
[email protected]:/home/homer# smbpasswd -U homer -r 192.168.100.5
Old SMB password:
New SMB password:
Retype new SMB password:
Password changed for user homer on 192.168.100.5.
This is a good way to reset a Windows password if you cannot actually get to the machine; but you have network access.
The command below shows how to download a file from a fileshare on a Windows machine using Samba.
[email protected]:/home/homer# smbget smb://homer-PC/users/homer/Desktop/net.txt
Username for users at homer-PC [guest] homer
Password for users at homer-PC:
Using workgroup BIGRIGS, user homer
Downloaded 235b in 7 seconds
This is a very interesting trick indeed. Allowing you to download a file without using a GUI.