...
Code Block |
---|
===== Setup # tested on lubuntu 13.10, 16.04.2 desktop edition #sudo apt-get install smbclient #smbclient -L //server -U user # list shares, theres is a cifs-utils version now named (?) #smbclient //server/share -U user # directly connect # you must have a Linux user account that matches on the NAS sudo apt-get install cifs-utils cd ~ mkdir myra # mounts read-only for read/write add --rw sudo mount -t cifs //192.168.0.5/myra ~/myra/ -o username=tin.pham,noexec Settled on, adding user phantom to folder in synology. # to mount read write you must have corresponding users on your system and nas # you must logged in as that user who has sudo # find the uid and gid using the command id, id # now you can mount using the uid, gid and -w to write sudo mount -t cifs //192.168.0.5/torrents -o username=setupadmin,noexec,uid=1000,gid=1000 -w ===== Initial Connections # From your clent system see what mounts are available on target system (this is the system sharing the data) # You can specify a user and verify your password works smbclient -L //192.168.0.5 -U tin.pham Enter tin.pham's password: Domain=[WORKGROUP] OS=[Unix] Server=[Samba 4.1.18] Sharename Type Comment --------- ---- ------- IPC$ IPC IPC Service () tin.archive Disk tin Disk rsync Disk pham Disk NetBackup Disk System default shared folder myra Disk guest.public Disk Available to all and guests. home Disk home Domain=[WORKGROUP] OS=[Unix] Server=[Samba 4.1.18] Server Comment --------- ------- DISKSTATION Workgroup Master --------- ------- WORKGROUP W7KITCHEN ===== Troubleshoot == Connect Directly using Samba to see if response is workig # You may need to install smblcient first. # Directly connect smbclient //192.168.0.5/guest.public -U tin.pham smb: \> # Run ls to see results and help to see list of commads smb: \>ls == Try Using Local Directory cd ~ mkdir guest.public sudo mount -t cifs //192.168.0.5/guest.public/ ~/guest.public/ -o username=tin.pham,noexec ===== List of mount # Backing Up su - phantom sudo mount -t cifs //192.168.0.5/guest.public /data/guest.public/ -o username=phantom,noexec sudo mount -t cifs //192.168.0.5/myra /data/myra/ -o username=phantom,noexec sudo mount -t cifs //192.168.0.5/pham /data/pham/ -o username=phantom,noexec sudo mount -t cifs //192.168.0.5/rsync /data/rsync/ -o username=rsync,noexec # remember to use different password sudo mount -t cifs //192.168.0.5/tin.archive /data/tin.archive -o username=phantom,noexec # For writing su - tin.pham sudo mount -t cifs //192.168.0.5/guest.public /mnt/guest.public/ -o username=tin.pham,noexec # Torrents # List samba cifs mounts sudo mount -t cifs # List all mounts with more details sudo mount -v |
...