Access Windows Shares From BASH In Linux
Page 1 of 1
Access Windows Shares From BASH In Linux
Vid
First you need to have samba installed.
First you need to have samba installed.
- Code:
sudo apt-get install samba
Then use a Bash script to mount windows share folder in linux using samba:
Code:
mkdir /mnt/smb
touch smb.sh
chmod +x smb.sh
sudo gedit smb.sh
Write the following into the smb.sh file using vi vim or gedit:
Code:
#/bin/bash
SERVER_IP="192.168.0.3"
SHARE_NAME="c$"
USERNAME="jay"
PASSWD="samba password"
DOMAIN="domain"
mount.cifs //$SERVER_IP/$SHARE_NAME -o username=$USERNAME,password=$PASSWD,dom=$DOMAIN
/mnt/smb/
Finally run the script to mount your Windows share and cd into the share:
Code:
./smb.sh
cd /mnt/smb/
Similar topics
» Bash Psychic Game For Linux Bash
» List Windows Shares On Linux Script
» windows xp and linux samba sharing folder shares
» how to access linux file system from inside windows
» how to setup samba for linux config and allowing linux shares and adding users to samba commands
» List Windows Shares On Linux Script
» windows xp and linux samba sharing folder shares
» how to access linux file system from inside windows
» how to setup samba for linux config and allowing linux shares and adding users to samba commands
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum