Difference between revisions of "LSDF Online Storage: SMB / CIFS"

From Lsdf
Line 1: Line 1:
  +
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. SMB shares of the LSDF Online Storage are only accessible from within the KIT network or via KIT-VPN.
<H1> Using SMB/CIFS for UNIX client (only KIT intern or KIT-VPN)</H1>
 
   
  +
'''Prerequisite:''' 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.
<H2>SMB Client</H2>
 
  +
  +
'''Warning:''' 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.
  +
  +
  +
== Using SMB/CIFS on Linux ==
  +
  +
=== SMB Client ===
   
'''Attention:''' To access data served by LSDF_Online_Storage via '''smbclient''', You need a '''''Service Password'''''. Please set your '' '''Service Password''' '' under following site: https://bwidm.scc.kit.edu.
 
<br>
 
 
A UNIX like operating system needs a CIFS client to use a share. CIFS clients are part of Samba implementation for Linux and other UNIX like operating systems (http://www.samba.org) <br><br>
 
A UNIX like operating system needs a CIFS client to use a share. CIFS clients are part of Samba implementation for Linux and other UNIX like operating systems (http://www.samba.org) <br><br>
  +
'''Attention:''' Posix style file commands (for instance chmod) must not be applied on files on a CIFS share. This may revoke sharing and Access Lists (ACLs), steering the access to the files.
 
  +
<br><br>
 
 
'''Example:'''
 
'''Example:'''
 
To list the files in a SMB share, use the program smbclient.
 
To list the files in a SMB share, use the program smbclient.
 
<pre>
 
<pre>
>smbclient -L os.lsdf.kit.edu -U 'os.lsdf.kit.edu\xy1234' -m SMB2
+
$ smbclient -L os.lsdf.kit.edu -U 'os.lsdf.kit.edu\xy1234' -m SMB2
 
Enter os.lsdf.kit.edu\xy1234's password:
 
Enter os.lsdf.kit.edu\xy1234's password:
 
Domain=[LSDF] OS=[] Server=[]
 
Domain=[LSDF] OS=[] Server=[]
   
Sharename Type Comment
+
Sharename Type Comment
--------- ---- -------
+
--------- ---- -------
IPC$ IPC IPC Service (LSDF Online Storage)
+
IPC$ IPC IPC Service (LSDF Online Storage)
kit Disk kit
+
kit Disk kit
iai-projects Disk iai-projects
+
iai-projects Disk iai-projects
 
iam-cms-projects Disk iam-cms-projects
 
iam-cms-projects Disk iam-cms-projects
scc-projects Disk scc-projects
+
scc-projects Disk scc-projects
ikp-projects Disk ikp-projects
+
ikp-projects Disk ikp-projects
ioc-projects Disk ioc-projects
+
ioc-projects Disk ioc-projects
ifh-projects Disk ifh-projects
+
ifh-projects Disk ifh-projects
itg-projects Disk itg-projects
+
itg-projects Disk itg-projects
 
imk-tro-projects Disk imk-tro-projects
 
imk-tro-projects Disk imk-tro-projects
 
imk-asf-projects Disk imk-asf-projects
 
imk-asf-projects Disk imk-asf-projects
ifkm-projects Disk ifkm-projects
+
ifkm-projects Disk ifkm-projects
  +
(...)
ibpt-projects Disk ibpt-projects
 
ips-projects Disk ips-projects
 
fast-projects Disk fast-projects
 
gpi-projects Disk gpi-projects
 
ifp-projects Disk ifp-projects
 
imk-aaf-projects Disk imk-aaf-projects
 
inr-projects Disk inr-projects
 
int-projects Disk int-projects
 
ipe-projects Disk ipe-prolects
 
iket-projects Disk iket-projects
 
ivd-projects Disk ivd-projects
 
itm-projects Disk itm-projects
 
lti-projects Disk lti-projects
 
sport-projects Disk sport-projects
 
imk-ifu-projects Disk imk-ifu-projects
 
ebi-projects Disk ebi-projects
 
aph-projects Disk aph-projects
 
...
 
 
</pre>
 
</pre>
   
 
The program allows You to access the files with a FTP like tool in an interactive shell.
 
The program allows You to access the files with a FTP like tool in an interactive shell.
 
<pre>
 
<pre>
>smbclient //os.lsdf.kit.edu/kit -U 'os.lsdf.kit.edu\xy1234' -m SMB2
+
$ smbclient //os.lsdf.kit.edu/kit -U 'os.lsdf.kit.edu\xy1234' -m SMB2
 
Enter os.lsdf.kit.edu\xy1234's password:
 
Enter os.lsdf.kit.edu\xy1234's password:
 
Domain=[LSDF] OS=[] Server=[]
 
Domain=[LSDF] OS=[] Server=[]
Line 59: Line 47:
 
</pre>
 
</pre>
   
  +
<h2>Mount a Share</H2>
 
  +
=== 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.
 
'''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.
Line 66: Line 55:
 
You do need root rights on the local system.
 
You do need root rights on the local system.
   
  +
<h3>Mount over command line</h3>
 
  +
==== Mounting a Remote File System Interactively (as normal user) ====
   
 
'''Example:'''
 
'''Example:'''
Line 90: Line 80:
 
</pre>
 
</pre>
   
  +
==== Mounting a Remote File System with /etc/fstab (as root) ====
<h3>Mount over /etc/fstab</h3>
 
   
 
'''Example:'''
 
'''Example:'''
Line 114: Line 104:
 
</pre>
 
</pre>
   
<H1> Using SMB/CIFS for Windows client (only KIT intern or KIT-VPN)</H1>
 
   
'''Attention:''' To access data served by LSDF Online Storage via CIFS, You need a '''''Service Password'''''. Please set your '' '''Service Password''' '' under following site: https://bwidm.scc.kit.edu.
 
   
  +
== Using SMB/CIFS on Windows ==
<br>
 
  +
 
You can use a CIFS share from a Microsoft operating system.
 
You can use a CIFS share from a Microsoft operating system.
   
<H2>Adopting Universal Naming Convention (UNC) syntax</H2>
+
=== Adopting Universal Naming Convention (UNC) syntax ===
   
 
Use Windows Explorer entering the path to the share in UNC syntax:
 
Use Windows Explorer entering the path to the share in UNC syntax:
Line 142: Line 131:
 
You can now manipulate Your files as accustomed.
 
You can now manipulate Your files as accustomed.
   
  +
<H2>Creation of a network (pseudo) drive with Windows Explorer</H2>
 
  +
=== Creation of a network (pseudo) drive with Windows Explorer ===
   
 
To connect to a network share in Windows Explorer select the control field<br>
 
To connect to a network share in Windows Explorer select the control field<br>
Line 149: Line 139:
 
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.
 
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.
   
  +
<hr>
 
  +
== External Links ==
<br>
 
  +
<br>
 
  +
* [https://bwidm.scc.kit.edu/service/set-password.xhtml?registryId=14181453 Service password management]
<br>
 
  +
<br>
 
  +
[[Category:LSDF_Online_Storage|CIFS|SMB]]
 
  +
[[Category:LSDF_Online_Storage|SMB|CIFS]]

Revision as of 11:30, 17 April 2019

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. SMB shares of the LSDF Online Storage are only accessible from within the KIT network or via KIT-VPN.

Prerequisite: To access the LSDF Online Storage via SMB it is required to set a service password. Please follow this link to initially set, change or delete your service password.

Warning: 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.


Using SMB/CIFS on Linux

SMB Client

A UNIX like operating system needs a CIFS client to use a share. CIFS clients are part of Samba implementation for Linux and other UNIX like operating systems (http://www.samba.org)


Example: To list the files in a SMB share, use the program smbclient.

$ 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
(...)

The program allows You to access the files with a FTP like tool in an interactive shell.

$ 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


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.
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:

>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:  ********** 

Verify the success of the mount invoking the mount command without any arguments:

mount | grep cifs 
//os.lsdf.kit.edu/kit on /mnt/cifs type cifs (rw)

Mounting a Remote File System with /etc/fstab (as root)

Example:

>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

Verify the success of the mount invoking the mount command without any arguments:

mount | grep cifs 
//os.lsdf.kit.edu/kit/inst/xy1234 on /mnt/mountpoint type cifs (rw)


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:

\\os.lsdf.kit.edu 
or
\\os.lsdf.kit.edu\kit\inst\xy1234
or
\\os.lsdf.kit.edu\inst-projects

Following the input of the UNC path, a window will pop up:
Loginname: os.lsdf.kit.edu\xy1234
Password: Service Password

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
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.

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