List Windows Shares On Linux Script

Go down

List Windows Shares On Linux Script

Post by jamied_uk on 25th September 2018, 12:18

Vid



Code:
#!/bin/bash
server="10.0.0.1"
workgroup="WORKGROUP"
debug="1" # 3 is default
#
echo "J~NET Remote Server Network Shares:"
echo "Enter Username: (Leave Blank For Current Username)"
read username
#
if [ -z "$username" ]
then
      username=$(whoami)
else
      echo "\$username Is The Selected Username."
fi
#
echo "Enter User's Password"
#
smbclient -d$debug -U="$username" -W="$workgroup" -L="$server"
avatar
jamied_uk
Admin

Posts : 2442
Join date : 2010-05-09
Age : 36
Location : UK

http://address-shortner.co.uk

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum