I. If you need to do that task on just one computer - I would do that this way:
- Create linux account for such tasks ("sambaadmin" for example), for better security
- Configure putty for automatic login on that account
Write your script that does your admin tasks (
/home/sambaadmin/see_clients.sh
for example). I would do your tasks this way:smbstatus -p read -p "Press [Enter] to exit..." exit
Add execute permissions to it (
chmod +x /home/sambaadmin/see_clients.sh
)Call this script at the end of /home/sambaadmin/.bash_profile file. .bash_profile is automatically executed after user login.
Create putty shoutcut on your windows desktop for that automatic login session
After you do that - your shourtuc will open putty, log in, your "admin task script " will be executed, you will see it in putty window and after you press Enter - session will end.
II. If you use many computers in company - write simple web application in python or use some server web management software (Webmin for example).
III. You can use cron to execute every minute or two script like this:
smbstatus -p > /somewhere/sambashare/openfiles.txt
You can make shortcut to that file in windows and just open it to see what is going on.
\\sambaserver\sambashare\openfiles.txt