Here's some steps to work with shares in Linux Mint
Create Shares on Server
m = /home/uc/drives/m o = /home/uc/drives/o cam = /home/uc/drives/cam
Samba Create Share
sudo touch /etc/libuser.conf ( required for samba config applet sudo system-config-samba
Create Workgroup
- Menu>Preferences>Basic
- Workgroup: UNITY
- Security:
Add Share...
Basic Tab
- Directory: /home/uc/shares/cam
- Share name: cam
- Description SecurityCamera
- x Writable
- x Visible
Access Tab
- Select specific users or everyone
Create Folders on Client
- Create folders for each share, the client will treat the shares as local resources
- I prefer placing these in my user dir to avoid permissions issues & keep my footprint on the system small & concise, but it's not required.
Folders for shares
/home/uc/shares/m /home/uc/shares/o /home/uc/shares/cam
Mount Server Shares to Client Folders with CIFS
- CIFS will can be used to mount shares but ONLY AS READ ONLY
- There might be a switch for this, but haven't looked
- This is actually a great idea to avoid data loss by other users
- Use SAMBA for READ/WRITE
- Also, some applications - such as VLC - won't read from samba shares.
- This might be only an issue with streaming applications
- my security camera videos won't play in VLC via Samba
- and the performance seems much better when I stream video over SAMBA in "X Player"
mount
sudo mount -t cifs //192.168.0.101/m /home/uc/shares/m -o user=user,password=pwd sudo mount -t cifs //192.168.0.101/o /home/uc/shares/o -o user=user,password=pwd sudo mount -t cifs //192.168.0.101/cam /home/uc/shares/cam -o user=user,password=pwd
UnMount Server Shares to Client Folders
unmount
sudo umount /home/uc/shares/m sudo umount /home/uc/shares/o sudo umount /home/uc/shares/cam
Mounting Shares with Nemo:"ConnectToServer...."
- Nimo>File>Connect to Server...
- Server: 192.168.1.1
- Type: Windows Share
- Port: N/A
- Share: cam
- Folder: /
- User Details
- Domain Name/Workgroup: UNITY
- Username: username
- password: password
CIFS Connection to Device
Shell Script for mounting/unmounting
#!/bin/bash #!/bin/bash # Menu Runner # --------------- function pause(){ read -p "$*" } function menuShow(){ PS3='Please enter choice: ' opts=("ls" "pwd" "MountShares" "UNMountShares" "Quit") select opt in "${opts[@]}" do case $opt in "ls") echo "u chose ls" ls ;; "pwd") echo "u chose pwd" pwd ;; "MountShares") echo "Mounting Shares...." sudo mount -t cifs //192.168.0.1/m /home/uc/shares/m -o user=user,password=pwd sudo mount -t cifs //192.168.0.1/o /home/uc/shares/o -o user=user,password=pwd sudo mount -t cifs //192.168.0.1/cam /home/uc/shares/cam -o user=user,password=pwd ;; "UNMountShares") echo "UNMounting Shares" sudo umount /home/uc/shares/m sudo umount /home/uc/shares/o sudo umount /home/uc/shares/cam ;; "rdp-silo6" ) rdesktop -g 1920x1000 -a 16 192.168.1.101 & ;; "rdp-e6410b") rdesktop -g 1920x1000 -a 16 192.168.1.106 & ;; "Quit") break ;; *) echo "invalid option $REPLY" ;; esac pause 'Press [Enter] key to continue...' done } menuShow
- Log in to post comments