LSDF Online Storage: SMB / CIFS: Difference between revisions
From Lsdf
Jump to navigationJump to search
No edit summary |
(Add migration note) Tag: Replaced |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
This page has been updated and migrated to the new docs site: |
|||
SMB or CIFS is a network protocol providing remote shared access to files. It implements a network file system similar to NFS allowing users of the LSDF Online Storage to mount or browse their storage projects from remote clients. |
|||
https://www.lsdf.kit.edu/docs/smb-cifs/ |
|||
== Prerequisites == |
|||
Please note the following requirements and restrictions when using the LSDF SMB service: |
|||
* To access the LSDF Online Storage via SMB it is required to set a service password. Please follow [https://bwidm.scc.kit.edu/service/set-password.xhtml?registryId=14181453 this link] to initially set, change or delete your service password. The service password will be used to authenticate your SMB client to the LSDF Online Storage SMB service. |
|||
* SMB shares of the LSDF Online Storage are only accessible from within the KIT network or via KIT-VPN. |
|||
* Posix style file commands like ''chmod'' must not be applied on files or folders on a SMB/CIFS share. Doing so may revoke access control lists (ACLs) preventing you or your project partners from accessing the shared file system via SMB. LSDF administrators can, if requested, prevent the usage of chmod on a storage project level. |
|||
== Using SMB/CIFS on Linux with the Samba Command Line Client == |
|||
Linux operating system need dedicated SMB clients to access shares. SMB clients are part of the Samba implementation for Linux and other UNIX like operating systems. To access a SMB share with the Samba command line client, e.g. to list all available shaes, issue the following commands: |
|||
<pre> |
|||
$ smbclient -L os.lsdf.kit.edu -U 'os.lsdf.kit.edu\xy1234' -m SMB2 |
|||
Enter os.lsdf.kit.edu\xy1234's password: |
|||
Domain=[LSDF] OS=[] Server=[] |
|||
Sharename Type Comment |
|||
--------- ---- ------- |
|||
IPC$ IPC IPC Service (LSDF Online Storage) |
|||
kit Disk kit |
|||
iai-projects Disk iai-projects |
|||
iam-cms-projects Disk iam-cms-projects |
|||
scc-projects Disk scc-projects |
|||
ikp-projects Disk ikp-projects |
|||
ioc-projects Disk ioc-projects |
|||
ifh-projects Disk ifh-projects |
|||
itg-projects Disk itg-projects |
|||
imk-tro-projects Disk imk-tro-projects |
|||
imk-asf-projects Disk imk-asf-projects |
|||
ifkm-projects Disk ifkm-projects |
|||
(...) |
|||
</pre> |
|||
The ''smbclient'' program provides a FTP like set of commands to access files and directories in an interactive shell: |
|||
<pre> |
|||
$ smbclient //os.lsdf.kit.edu/kit -U 'os.lsdf.kit.edu\xy1234' -m SMB2 |
|||
Enter os.lsdf.kit.edu\xy1234's password: |
|||
Domain=[LSDF] OS=[] Server=[] |
|||
smb: \> pwd |
|||
Current directory is \\os.lsdf.kit.edu\kit\ |
|||
smb: \> help |
|||
</pre> |
|||
=== Mounting a Share === |
|||
'''Attention:''' To access data served by LSDF_Online_Storage via CIFS protocol, You need a '''''Service Password'''''. Please set your '' '''Service Password''' '' under following site: https://bwidm.scc.kit.edu. |
|||
<br> |
|||
A share can be mounted to a local directory, (e.g. /mnt/cifs ). |
|||
You do need root rights on the local system. |
|||
==== Mounting a Remote File System Interactively (as normal user) ==== |
|||
'''Example:''' |
|||
<pre> |
|||
>mkdir /mnt/cifs |
|||
>mount -t cifs -o vers=2.0,username='xy1234' //os.lsdf.kit.edu/inst-projects /mnt/cifs |
|||
Password for xy1234@//os.lsdf.kit.edu/inst-projects: ********** |
|||
-------------------------------------------------------------------------------------------- |
|||
>df | grep cifs |
|||
//os.lsdf.kit.edu/inst-projects 966367641600 138649829376 827717812224 15% /mnt/cifs |
|||
or |
|||
>mount -t cifs -o vers=2.0,username='xy1234' //os.lsdf.kit.edu/kit /mnt/cifs |
|||
Password for xy1234@//os.lsdf.kit.edu/kit: ********** |
|||
</pre> |
|||
Verify the success of the mount invoking the mount command without any arguments: |
|||
<pre> |
|||
mount | grep cifs |
|||
//os.lsdf.kit.edu/kit on /mnt/cifs type cifs (rw) |
|||
</pre> |
|||
==== Mounting a Remote File System with /etc/fstab (as root) ==== |
|||
'''Example:''' |
|||
<pre> |
|||
>mkdir /mnt/mountpoint |
|||
/etc/fstab |
|||
//os.lsdf.kit.edu/kit/inst/xy1234 /mnt/mountpoint cifs uid= xxxx,gid= yyyy,credentials=/path_to_user_HOME/credentialsfile,auto 0 0 |
|||
# xy1234 : LSDF Online Storage user |
|||
# xxxx/yyyy : user uid/gid |
|||
>cat /path_to_user_HOME/credentialsfile |
|||
username=xy1234 |
|||
password=***** |
|||
domain=os.lsdf.kit.edu |
|||
>mount /mnt/mountpoint |
|||
</pre> |
|||
Verify the success of the mount invoking the mount command without any arguments: |
|||
<pre> |
|||
mount | grep cifs |
|||
//os.lsdf.kit.edu/kit/inst/xy1234 on /mnt/mountpoint type cifs (rw) |
|||
</pre> |
|||
== Using SMB/CIFS on Windows == |
|||
You can use a CIFS share from a Microsoft operating system. |
|||
=== Adopting Universal Naming Convention (UNC) syntax === |
|||
Use Windows Explorer entering the path to the share in UNC syntax: |
|||
'''Examples:''' |
|||
<pre> |
|||
\\os.lsdf.kit.edu |
|||
or |
|||
\\os.lsdf.kit.edu\kit\inst\xy1234 |
|||
or |
|||
\\os.lsdf.kit.edu\inst-projects |
|||
</pre> |
|||
Following the input of the UNC path, a window will pop up: <br> |
|||
'''Loginname:''' os.lsdf.kit.edu\xy1234 <br> |
|||
'''Password:''' ''Service Password'' |
|||
<br><br> |
|||
Following authentication a new window pops up, showing the content of the share. |
|||
You can now manipulate Your files as accustomed. |
|||
=== Creation of a network (pseudo) drive with Windows Explorer === |
|||
To connect to a network share in Windows Explorer select the control field<br> |
|||
Select a drive letter to be associated with the network share and enter the network path (e.g. \\os.lsdf.kit.edu\kit). Select ‘use a different identification‘, as these differ from Your credential used locally. |
|||
<br><br> |
|||
Instead of the domain name in KIT, which You are accustomed to, take for user xy1234 e.g.: '''os.lsdf.kit.edu\xy1234'''. Use the dedicated '''''service password''''' instead of Your KIT Domain password. |
|||
== External Links == |
|||
* [https://bwidm.scc.kit.edu/service/set-password.xhtml?registryId=14181453 Service password management] |
|||
[[Category:LSDF_Online_Storage|SMB|CIFS]] |
Latest revision as of 18:51, 21 February 2023
This page has been updated and migrated to the new docs site: