{"id":2638,"date":"2018-11-15T16:16:38","date_gmt":"2018-11-15T23:16:38","guid":{"rendered":"http:\/\/wp.natsci.colostate.edu\/cnsit\/?p=2638"},"modified":"2022-04-25T14:41:58","modified_gmt":"2022-04-25T20:41:58","slug":"mapping-rstor-to-linux-with-cifs","status":"publish","type":"post","link":"https:\/\/cnsit.colostate.edu\/kb\/mapping-rstor-to-linux-with-cifs\/","title":{"rendered":"Mapping RStor to Linux with CIFS"},"content":{"rendered":"<p>This tutorial will describe how to map an RStor location to a Linux computer using CIFS (Common Internet File System).\u00a0 CIFS is a dialect of SMB (Server Message Block) meaning that it can be thought of as an in place replacement for Microsoft&#8217;s SMB protocol.\u00a0 In short, this is how you map the same drive in Linux as you would in Windows or MacOS through SMB.<\/p>\n<p>If you are unsure what RStor is or how to request a space, check out the following first: <a href=\"https:\/\/cnsit.colostate.edu\/kb\/rstor-has-arrived\">https:\/\/cnsit.colostate.edu\/kb\/rstor-has-arrived<\/a><\/p>\n<p>I am using CentOS 7 as the Linux distribution for creating this tutorial, although these should apply (possibly with slight modifications) to any other distribution of Linux.\u00a0 I will be presenting commands that are to be applied to a terminal, many of which require root (<em>sudo)<\/em> access, so be sure the account in use has administrative permissions.<\/p>\n<p>The method described below creates the following scenario.\u00a0 We will be mounting a single RStor sharepoint using a single NetID.\u00a0 The NetID credentials will be stored in a location where only users with root (<em>sudo<\/em>) access can view.\u00a0 This is ideal for systems that would like to mount an RStor share where there is a single <em>sudo<\/em> enabled user that sets up the share.\u00a0 All other users should not have <em>sudo<\/em> access, but can still take advantage of the mounted RStor share.<\/p>\n<p>1.) First, we will be creating a directory to mount RStor on.\u00a0 Essentially, all we are doing is making an empty directory where the mount command will attach the RStor CIFS.\u00a0 In this example, I will create a directory in the root of the Linux installation called &#8220;rstor&#8221;.<\/p>\n<pre>sudo mkdir \/rstor<\/pre>\n<p>2.) We will now create a credentials file where the user with access to the RStor location can save their login information.\u00a0 We will store this file in the \/root directory, and be sure to set the appropriate permissions so that only a user with root (sudo) access can view.\u00a0 First, create and edit the file using the <em>nano<\/em> terminal file editor with the following command:<\/p>\n<pre>sudo nano \/root\/rstor_credentials.txt<\/pre>\n<p>You should populate this file with the following text.\u00a0 Be sure to use your own information in <span style=\"color: #0000ff;\">YOUR_NetID\u00a0<\/span>\u00a0and <span style=\"color: #0000ff;\">YOUR_NetID_PASSWORD<\/span><\/p>\n<pre>username=<span style=\"color: #0000ff;\">YOUR_NetID<\/span>\npassword=<span style=\"color: #0000ff;\">YOUR_NetID_PASSWORD<\/span>\ndomain=colostate<\/pre>\n<p>Now, you will need to update the permissions for this file with the following command:<\/p>\n<pre>sudo chmod 600 \/root\/rstor_credentials.txt<\/pre>\n<p>3.) Now that we have a place to attach the RStor share, we will edit a file that controls such things in <em>\/etc\/fstab<\/em>.\u00a0 In this example I will again be using the <em>nano<\/em> terminal file editor to append the following line to the end of the <em>\/etc\/fstab<\/em> file.\u00a0 The information for <span style=\"color: #0000ff;\">SHARE_NAME<\/span> below for the following must be customized to match share name created in RStor for your use:<\/p>\n<pre>\/\/campusrstor1.onefs.colostate.edu\/natsci\/<span style=\"color: #0000ff;\">SHARE_NAME<\/span> \/rstor cifs credentials=\/root\/rstor_credentials.txt,auto,_netdev 0 0<\/pre>\n<p>4.) That is it!\u00a0 You can either restart your computer to test its automount capability, or force the mount using the following command:<\/p>\n<pre>sudo mount \/rstor<\/pre>\n<p>With an understanding of this process, it should be clear how you can add more rstor mount points to the same system.\u00a0 Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial will describe how to map an RStor location to a Linux computer using CIFS (Common Internet File System).\u00a0 CIFS is a dialect of SMB (Server Message Block) meaning that it can be thought of as an in place replacement for Microsoft&#8217;s SMB protocol.\u00a0 In short, this is how you map the same drive [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":2432,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,6,13,14],"tags":[],"class_list":["post-2638","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general-cnsit","category-knowledge-base","category-the-cloud","category-tips-and-tricks"],"_links":{"self":[{"href":"https:\/\/cnsit.colostate.edu\/kb\/wp-json\/wp\/v2\/posts\/2638","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cnsit.colostate.edu\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cnsit.colostate.edu\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cnsit.colostate.edu\/kb\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/cnsit.colostate.edu\/kb\/wp-json\/wp\/v2\/comments?post=2638"}],"version-history":[{"count":1,"href":"https:\/\/cnsit.colostate.edu\/kb\/wp-json\/wp\/v2\/posts\/2638\/revisions"}],"predecessor-version":[{"id":4441,"href":"https:\/\/cnsit.colostate.edu\/kb\/wp-json\/wp\/v2\/posts\/2638\/revisions\/4441"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cnsit.colostate.edu\/kb\/wp-json\/wp\/v2\/media\/2432"}],"wp:attachment":[{"href":"https:\/\/cnsit.colostate.edu\/kb\/wp-json\/wp\/v2\/media?parent=2638"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cnsit.colostate.edu\/kb\/wp-json\/wp\/v2\/categories?post=2638"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cnsit.colostate.edu\/kb\/wp-json\/wp\/v2\/tags?post=2638"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}