diff --git a/content/handling_data/data_storage/NRDSTOR/Smbclient.md b/content/handling_data/data_storage/NRDSTOR/Smbclient.md new file mode 100644 index 0000000000000000000000000000000000000000..da769e2ac6e3ebba07ce9aa8ecf02883d07f4be5 --- /dev/null +++ b/content/handling_data/data_storage/NRDSTOR/Smbclient.md @@ -0,0 +1,91 @@ ++++ +title = "Smbclient" +description = "Using Smbclient to Access NRDStor" +weight=30 ++++ + +NRDStor can be accessed using the **`smbclient`** command-line utility. + +### Install Smbclient + +You can download smbclient from https://www.samba.org/samba/download/. + +### Accessing and Managing Files + +Once smbclient is installed, you can use **`smbclient`** commands to navigate directories and manage files. Here are a few examples: + +#### Accessing Files + +To access a specific directory and retrieve a file, use the following command: + +```bash +smbclient \\\\nrdstor.unl.edu\\nrdstor -U <campusName>/<UniversityUsername> -c "cd <groupname>/<username>/; get readme.txt" +``` + +In this command: + +- **`\\\\nrdstor.unl.edu\\nrdstor`**: The path to the NRDStor server. + +- **`-U <campusName>/<UniversityUsername>`**: Your login credentials, where **`campusName`** corresponds to your campus and **`UniversityUsername`** is your specific NU user name. + +{{% notice info %}} +The **`<campusName>/<UniversityUsername>`** values to use depend on which campus you are associated with. Users from UNL, UNK, and UNO may use their local campus credentials. Users from UNMC must use their NUID username and password. Refer to the following table: + +| Campus | Campus Login | SMB_Campus_Identifer | +|--------|--------------------------|----------------------------| +| UNL | husker@unl.edu | UNL-AD/husker | +| UNO | maverick@unomaha.edu | UNOMAHA/maverick | +| UNK | loper@unk.edu | UNKNET/loper | +| UNMC (via NUID) | 00000000 (NUID) | NEAD/00000000 | + +In the examples provided here, please replace **`<campusName>/<UniversityUsername>`** with the value from the SMB_Campus_Identifer column in the table, and the respective NU username/ID. + +{{% /notice %}} + +- **`-c "cd <groupname>/<username>/; get readme.txt"`**: This **`-c`** option passes a command string to **`smbclient`**. + + - **`cd <groupname>/<username>/`**: The command to change the directory. **`groupname`** is the name of your HCC group, and **`username`** is your HCC username. + + - **`get readme.txt`**: get the file **`readme.txt`**. + +#### Uploading Files + +To upload a file to a specific directory, use the following command: + +```bash +smbclient \\\\nrdstor.unl.edu\\nrdstor -U <campusName>/<UniversityUsername> -c "cd <groupname>/<username>/; put readme.txt" +``` + +In the command string: + +- **`put readme.txt`**: The command to upload the file **`readme.txt`** to the specified directory. + +#### Downloading Full Directory + +To download a specific directory from the server, use the following command: + +```bash +smbclient \\\\nrdstor.unl.edu\\nrdstor -U <campusName>/<UniversityUsername> -c "recurse; prompt OFF; cd <groupname>/<username>/; mget directory_name" +``` + +In the command string **`"recurse; prompt OFF; cd <groupname>/<username>/; mget directory_name"`**: + + - **`recurse`**: Ensures that the command will operate recursively, affecting all subdirectories and their contents. + + - **`prompt OFF`**: Turns off prompting to confirm each file transfer. + + - **`cd <groupname>/<username>/`**: Changes the directory on the remote server to the specified path. + + - **`mget directory_name`**: Downloads the directory named **`directory_name`** from the server. + +#### Uploading Full Directory + +To upload a specific directory to the server, use the following command: + +```bash +smbclient \\\\nrdstor.unl.edu\\nrdstor -U <campusName>/<UniversityUsername> -c "recurse; prompt OFF; cd <groupname>/<username>/; mput directory_name" +``` + +In the command string **`"recurse; prompt OFF; cd <groupname>/<username>/; mput directory_name"`**: + + - **`mput directory_name`**: Uploads the directory named **`directory_name`** to the server. diff --git a/content/handling_data/data_storage/NRDSTOR/_index.md b/content/handling_data/data_storage/NRDSTOR/_index.md index b09d0efda3a7099dfa7dfe57c4469e9409eb4d53..52cf33cfe1af6062bfbdccd606c16123bef63650 100644 --- a/content/handling_data/data_storage/NRDSTOR/_index.md +++ b/content/handling_data/data_storage/NRDSTOR/_index.md @@ -35,3 +35,4 @@ NRDStor has two current methods of access - directly on Swan similar to the exis - [Accessing NRDStor From Swan]({{< relref "Swan" >}}) - [Accessing NRDStor From Windows]({{< relref "Windows" >}}) - [Accessing NRDStor From Mac]({{< relref "Mac" >}}) +- [Using smbclient to access NRDStor]({{< relref "Smbclient" >}})