A collection of computer systems and programming tips that you may find useful.
 
Brought to you by Craic Computing LLC, a bioinformatics consulting company.

Tuesday, November 13, 2018

Sharing a folder on a Synology NAS with MacOS and Ubuntu linux using CIFS / SMB

I have a Synology DS418 Network Attached Storage (NAS) system.

I wanted to create a Shared Folder on the NAS that I could access from Mac OS (Mojave 10.14) and a Linux box running Ubuntu 16.04.

MacOS uses SMB to share folders and so I decided to use that on the Linux box.

There are 3 parts to this process:

#1 Set up the folder on the NAS.

In Synology File Station, create the folder (SMBtest is the name used here). Under the Permissions Tab I gave my user (jones) full control by selecting 'Administration' and 'Change Permissions' and 'Take Ownership'

I think that is all that is needed on the NAS.

#2 on the Mac

Under the Finder -> 'Go' -> 'Connect to Server'
In my case the address to use was 'smb://craic-nas-1'
Connect as Registered User on the NAS and then select the volume 'SMBtest'

I then had access to that volume in the Finder or at /Volumes/SMBtest on the command line

#3 on the Linux box

Ubuntu Linux uses the CIFS "common internet file system" protocol to communicate with SMB servers.

I had to install the CIFS software

sudo apt-get install cifs-utils

and I created a credentials file with my NAS username and password.

emacs ~/.smbcredentials

username=jones
password=<mypassword>

chmod 600 ~/.smbcredentials

I created a mount point on the Linux box and made myself the owner

mkdir /mnt/
mkdir /mnt/jones
sudo chown jones.jones /mnt/jones

To mount that shared folder

sudo mount -t cifs -o credentials=~/.smbcredentials,uid=1000,gid=1000,iocharset=utf8 //craic-nas-1/SMBtest /mnt/jones/SMBtest

My UID on the linux box is 1000 - the uid and gid options means that the mounted directory is owned by me on the linux box - otherwise there are all sorts of permission issues.

The iocharset=utf8 is important. Without it, if I edited a file on Linux then there would be strange characters when I looked at it on the Mac side.

With that mount command I can create, edit and run scripts on either MacOS or Linux

To unmount the share

sudo umount /mnt/jones/SMBtest

To mount the share automatically I added this to /etc/fstab

//craic-nas-1/SMBtest /mnt/jones/SMBtest cifs credentials=/home/jones/.smbcredentials,uid=1000,iocharset=utf8 0 0

To test that works

sudo mount -a











Wednesday, January 3, 2018

Audio Cover on Gigabyte Aorus Z370 Gaming 7 Motherboard Blocks PCIEX16 Slot

I've just finished building a machine learning Linux machine based on the Gigabyte Aorus Z370 Gaming 7 Motherboard and a Gigabyte Aorus Geforce GTX 1080 Ti graphics card.

Most high end motherboards these days are aimed at gamers and so they include all sorts of RGB Led lights and assorted bling so that the users can install them in cases with a clear side. I don't care about all that.

The problem with this motherboard and card combination is that, as part of the bling, they have covered part of the board with a piece of plastic, marked as 'AMP-UP AUDIO', which has no actual function... and one end of that lies in front of the PCIEX16 slot where the graphics card needs to sit (see the arrow).


Here is the tab on the graphics card that is blocked. I don't know if other cards have this tab.



So with the plastic in place, you can't seat the card... and both components are from the same manufacturer... sigh

Fortunately, because the cover has no function whatsoever, you can just remove it and solve the problem. Flip over the motherboard and remove these two small screws. Throw the nasty piece of plastic in the recycling. Job done...


Archive of Tips