Differences between revisions 42 and 55 (spanning 13 versions)
Revision 42 as of 2016-11-22 14:56:39
Size: 4233
Editor: gfreudig
Comment:
Revision 55 as of 2016-11-24 14:43:13
Size: 5411
Editor: gfreudig
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from Services/FileAccess/FileSystemAccess
Line 3: Line 4:
== Three methods accessing Samba shares from Linux with Gnome (all machines at ETH) == == Accessing Samba shares from Linux ==
=== Overview ===
Recent Linux Kernels contain the userspace filesystem FUSE. This allows you to use all sorts of new an inovative ways for mounting remote fileystems with normal user privileges. Samples are the "gnome userspace virtual filesystem" and "sshfs" based on SSH.<<BR>>
Line 5: Line 8:
=== Mountpoint === All graphical desktop file managers must use FUSE based solutions to access remote SMB/CIFS filesystems because they are running with normal user privileges.<<BR>>
Line 7: Line 10:
In all cases, the share will be mounted in `/run/user/$UID/gvfs/smb-share:server=X,share=Y` so that you can also access it on the command line. In all cases, the share will be mounted in `/run/user/$UID/gvfs/smb-share:server=X,share=Y` so that you can also access it on the command line.<<BR>>
Line 9: Line 12:
=== gvfs-mount === As documented in https://computing.ee.ethz.ch/Workstations/FindYourData the share //itet-stor.ee.ethz.ch/<YourAccount> is a good place to find all your accessible CIFS resources. Technical this share is an implementation of a "Distributed File System (DFS)" root for your account. Unfortunately not all desktop file managers can handle this special kind of a share. With the KDE file managers Konqueror and Dolphin you cann't use this share (see

=== Command Line ===
==== gvfs-mount ====
Line 14: Line 20:
mmuster@testclient:~> gvfs-mount smb://homes.ee.ethz.ch/smbtest
Password required for share smbtest on homes.ee.ethz.ch
User [mmuster]: d\mmuster
pmuster@testclient:~> gvfs-mount smb://itet-stor.ee.ethz.ch/pmuster
Password required for share pmuster on itet-stor.ee.ethz.ch
User [pmuster]: pmuster
Line 24: Line 30:
mmuster@testclient:~> gvfs-mount -u smb://homes.ee.ethz.ch/smbtest pmuster@testclient:~> gvfs-mount -u smb://itet-stor.ee.ethz.ch/pmuster
}}}
==== smbclient ====
smbclient is something like an interactive shell to the file server and also a good troubleshooting tool for connection problems. To connect your personal DFS root share enter:
{{{
pmuster@testclient:~$ smbclient -W d //itet-stor.ee.ethz.ch/pmuster
Enter pmuster's password:
Domain=[D] OS=[Windows 6.1] Server=[Samba 4.2.10-Debian]
smb: \>
smb: \> ls
  . D 0 Thu Oct 13 15:27:09 2016
  .. D 0 Thu Nov 24 04:55:59 2016
  home D 0 Thu Oct 13 15:27:09 2016
  project01 D 0 Thu Oct 13 15.27:09 2016

  47929224 blocks of size 1024. 37295664 blocks available
smb: \> cd home
smb: \home\>
smb: \home\> ls
  . D 0 Thu Nov 24 09:35:24 2016
  .. DA 0 Thu Nov 24 08:17:38 2016
  public_html D 0 Wed Feb 3 15:34:27 2016
  Desktop D 0 Mon May 23 14:57:56 2016
  Downloads D 0 Mon May 23 14:50:26 2016
  ....

  1536000 blocks of size 1024. 1340637 blocks available
smb: \home\> exit
pmuster@testclient:~$
}}}
With the command help you get a list of all available commands inside the shell.





==== root mount ====
You can also mount your Samba home area with CIFS. This method is only available on computers where you have root access (i.e. this does not work on Linux workstations managed by us). '''If the command returns an error message saying "wrong fs type", make sure the package "cifs-utils" is installed.'''

{{{
$ sudo su
# mkdir /itet-stor
# mount -t cifs -o user=<d\your_tardis_login>,name=itet-stor.ee.ethz.ch \\\\itet-stor.ee.ethz.ch\\<d\your_tardis_login> /itet-stor
Line 27: Line 75:
=== Nautilus Application === === Desktop File Managers ===
Line 29: Line 77:
Select on the left side '''Connect to network''' and enter the name of the share in the '''Server Address''' field, e.g. as 'smb://homes.ee.ethz.ch/smbtest'. ==== Gnome Nautilus ====

Select on the left side '''Connect to network''' and enter the name of the share in the '''Server Address''' field, e.g. as 'smb://itet-stor.ee.ethz.ch/pmuster'.
Line 33: Line 83:
{{attachment:gvfs-nautilus.png}} {{attachment:nautilus.png}}
Line 35: Line 85:


=== 'Connect to Server' Application ===
==== XFCE Nemo ====
Line 41: Line 89:
{{attachment:gvfs-connect-to-server.png}} {{attachment:nemo.png}}
Line 43: Line 91:
== Accessing Samba shares from Linux with Konqueror (all machines at ETH) ==
Open your Konqueror Filemanager/Webbrowser.
=== KDE Konqueror,Dolphin (all machines at ETH) ===
As mentioned above Konqueror and Dolphin cann't be used to access smb resources over \\itet-stor\username.<<BR>>
Line 46: Line 94:
As location, use smb://server/directory followed by <Enter>Type your username and password in the following dialog box. Open your Konqueror or Dolphin Filemanager/Webbrowser.
Line 48: Line 96:
For accessing your share provided from ID, use the following data: As location, use smb://server/share followed by <Enter>Type your username and password in the following dialog box.

For accessing your home share provided from ID, use the following data:
Line 57: Line 107:
For accessing your D-ITET share, user the following:
For accessing your D-ITET home share, use the following data:
Line 60: Line 111:
Location: smb://homes.ee.ethz.ch/username Location: smb://nas-itet-01/itet_isg_homes_<nn>/username
Line 65: Line 116:

== Using CIFS to connect to Samba shares ==
You can also mount your Samba home area with CIFS. This method is only available on computers where you have root access (i.e. this does not work on Linux workstations managed by us). '''If the command returns an error message saying "wrong fs type", make sure the package "cifs-utils" is installed.'''

{{{
$ sudo su
# mkdir /tardis-home
# mount -t cifs -o user=<d\your_tardis_login>,name=homes.ee.ethz.ch \\\\homes.ee.ethz.ch\\<d\your_tardis_login> /tardis-home
}}}
Recent Linux Kernels contain the userspace filesystem [[http://fuse.sourceforge.net/|FUSE]]. This allows you to use all sorts of new an inovative ways for mounting remote fileystems ... for example you can mount a file system via an ssh connection without needing root privileges:
== SSH File System ==
Line 87: Line 129:
Line 89: Line 132:
== Windows Network Drive ==
You can access your home directory by mounting {{{\\homes.ee.ethz.ch\username}}} as network drive in Windows.

If you do this from outside ETH, you need to create a [[http://computing.ee.ethz.ch/Workstations/Network/VPN | VPN connection]] first.

Click on the Computer shortcut and then click on the 'Map network drive' button from the upper toolbar.

Select the drive letter you want to use for this mapping. The Address to your folder is \\homes.ee.ethz.ch\YOUR-USERNAME. Im this example its pmeier. Replace pmeier with your username. Set the Checkbox "Connect using different credentials" and if you want, set "Reconnect at logon". Click on finish.

{{attachment:WindowsNetworkDrive1.png}}


On the next screen, Enter d\YOUR-USERNAME and Enter your password. When done, click on OK.

{{attachment:WindowsNetworkDrive2.png}}

If the mapping process worked fine, the newly created drive will open and will become available.

Accessing Samba shares from Linux

Overview

Recent Linux Kernels contain the userspace filesystem FUSE. This allows you to use all sorts of new an inovative ways for mounting remote fileystems with normal user privileges. Samples are the "gnome userspace virtual filesystem" and "sshfs" based on SSH.

All graphical desktop file managers must use FUSE based solutions to access remote SMB/CIFS filesystems because they are running with normal user privileges.

In all cases, the share will be mounted in /run/user/$UID/gvfs/smb-share:server=X,share=Y so that you can also access it on the command line.

As documented in https://computing.ee.ethz.ch/Workstations/FindYourData the share //itet-stor.ee.ethz.ch/<YourAccount> is a good place to find all your accessible CIFS resources. Technical this share is an implementation of a "Distributed File System (DFS)" root for your account. Unfortunately not all desktop file managers can handle this special kind of a share. With the KDE file managers Konqueror and Dolphin you cann't use this share (see

Command Line

gvfs-mount

You can also connect to a Samba share on the command line. After you run that command, you can browse the share in Nautilus.

pmuster@testclient:~> gvfs-mount smb://itet-stor.ee.ethz.ch/pmuster
Password required for share pmuster on itet-stor.ee.ethz.ch
User [pmuster]: pmuster
Domain [WORKGROUP]: d
Password: ********

To unmount a share on the command line, just add the -u flag:

pmuster@testclient:~> gvfs-mount -u smb://itet-stor.ee.ethz.ch/pmuster

smbclient

smbclient is something like an interactive shell to the file server and also a good troubleshooting tool for connection problems. To connect your personal DFS root share enter:

pmuster@testclient:~$ smbclient -W d //itet-stor.ee.ethz.ch/pmuster
Enter pmuster's password: 
Domain=[D] OS=[Windows 6.1] Server=[Samba 4.2.10-Debian]
smb: \>
smb: \> ls
  .                                   D        0  Thu Oct 13 15:27:09 2016
  ..                                  D        0  Thu Nov 24 04:55:59 2016
  home                                D        0  Thu Oct 13 15:27:09 2016
  project01                           D        0  Thu Oct 13 15.27:09 2016

                47929224 blocks of size 1024. 37295664 blocks available
smb: \> cd home
smb: \home\>
smb: \home\> ls
  .                                   D        0  Thu Nov 24 09:35:24 2016
  ..                                 DA        0  Thu Nov 24 08:17:38 2016
  public_html                         D        0  Wed Feb  3 15:34:27 2016
  Desktop                             D        0  Mon May 23 14:57:56 2016
  Downloads                           D        0  Mon May 23 14:50:26 2016
  ....

                1536000 blocks of size 1024. 1340637 blocks available
smb: \home\> exit
pmuster@testclient:~$ 

With the command help you get a list of all available commands inside the shell.

root mount

You can also mount your Samba home area with CIFS. This method is only available on computers where you have root access (i.e. this does not work on Linux workstations managed by us). If the command returns an error message saying "wrong fs type", make sure the package "cifs-utils" is installed.

$ sudo su
# mkdir /itet-stor
# mount -t cifs -o user=<d\your_tardis_login>,name=itet-stor.ee.ethz.ch \\\\itet-stor.ee.ethz.ch\\<d\your_tardis_login>  /itet-stor

Desktop File Managers

Gnome Nautilus

Select on the left side Connect to network and enter the name of the share in the Server Address field, e.g. as 'smb://itet-stor.ee.ethz.ch/pmuster'.

Enter the details as given in the screenshot below.

nautilus.png

XFCE Nemo

Open the Connect to Server application and enter the details similar to the screenshot below.

nemo.png

KDE Konqueror,Dolphin (all machines at ETH)

As mentioned above Konqueror and Dolphin cann't be used to access smb resources over \\itet-stor\username.

Open your Konqueror or Dolphin Filemanager/Webbrowser.

As location, use smb://server/share followed by <Enter>Type your username and password in the following dialog box.

For accessing your home share provided from ID, use the following data:

Location:   smb://nas-nethz-users.ethz.ch/share-u-$/username
Username:   d\yourNethzUsername
Password:   yourPrivatePassword

Obs! The 'share-u-$' part of the location is dependant on the first character in your  username. If your username is 'kpelle', this part of the location will change to 'share-k-$'

For accessing your D-ITET home share, use the following data:

Location:   smb://nas-itet-01/itet_isg_homes_<nn>/username
Username:   d\username
Password:   yourPrivatePassword

SSH File System

$ mkdir ~/tardis-home
$ sshfs <d\your_tardis_login>@login.ee.ethz.ch: ~/tardis-home

But please note, that you can't do sshfs on homes.ee.ethz.ch - use login.ee.ethz.ch instead!

You can also unmount it again by typing:

$ fusermount -u ~/tardis-home

Please note that sshfs is not officially supported by the ISG.EE


CategoryEDUC

Services/FileAccess/CIFSLinux (last edited 2022-11-10 14:03:06 by stroth)