Ceci est une ancienne révision du document !
Titre : Mapping A Network Drive
Rarely will anyone want to continually type a networked folder by name, and this is where network drive mapping comes in handy. In Windows XP you can assign an unused drive letter to a folder on the network. In the example above \\storage01\sharename (a folder on the network) will become W: in My Computer. A similar thing can be done in most *buntu distros.
Kubuntu
Drive mapping in Kubuntu is quite easy. Simply browse through your network until you find a folder you would like a shortcut to. Right click on the folder and choose “Add to places”.
Your folder will show on the list in the left panel. The globe signifies a network item.
You can remove the item from the list by right clicking on it and choosing “Remove entry…”.
You can use this handy trick as a sidebar shortcut for almost any folder local or networked.
Gnome-Shell
In Gnome-Shell this works almost the same. First, find the folder or disk you want to mount in Nautilus, then right-click it and choose Mount. The mounted folder will now appear in the left column in Nautilus. From there you can choose it as if it were a local folder. When you want to un-mount it, just right-click on the mounted folder in the left panel of Nautilus and choose un-mount.
This is nice, but needs to be done every time you boot your computer since the mount won’t last. For a sticky mount you have to use the /etc/fstab file. In this file all disks and folders which need to be mounted during boot are listed. A normal samba way of mounting a network disk or folder is:
192.168.1.1/Back-Up /home/jan/shares/Back-Up cifs rw,username=guest,password=,uid=1000,iocharset=utf8,codepage=unicode,unicode 0 0 Red part: address of network folder in your network Blue part: address of local mount point Grey part: cifs is synonym for the samba protocol Orange part: options you want to add. These options work for guest-access with read-write permissions. Be careful when editing this file. It is a system file and can be edited only by root. This should tell you enough. Once damaged you will have a really bad time fixing it again. So, make a copy first before you start editing. It goes without saying that the folder you want to mount should be shared on the network. This can be done like this: As root, open the file /etc/samba/smb.conf in gedit. This is the file on the other computer, the one with the folder you want to look into. When this is a Windows computer then it is only necessary to add the computer to the same network as your Linux computer. Make sure the following items are in the smb.conf file. [global] workgroup = “Networkname you use” netbios name = “Computername” [Home-Jan] # Name of shared folder path = /home/jan/ # full path guest ok = yes # guest login without credentials is allowed writable = yes # guests are allowed to write The [global] section is written once at the beginning of the file, the shared folder part needs to be written here for every folder you want to share – of course with different share name and path. Reboot both systems, where it is mandatory to boot the one with the shared folder first. This way, when the other computer boots and the file fstab is being read, the shared folder is present and can be booted. Should you boot the other computer first, no worries. Open a terminal and type: sudo mount -a Now fstab will be read again and all folders will be booted. Xubuntu In Xubuntu, you can access networked drives via the Thunar file manager by going to “Network” in the left hand panel and navigating to the share. You can then click on and drag the share or specific directory you wish to map over to the left hand panel. This will map the location to the panel for the duration of your session. Lubuntu To “map” a network drive in Lubuntu, you use the file manager, PCManFM. For the purposes of this exercise, it is assumed that you already have access to the network drive you want to map. With the file manager open, enter the address of the network drive you want to access so that you are connected to it. Once you are connected to the drive you want to map, from the menu bar in the file manager select Bookmarks > Add To Bookmarks. You are then prompted for a name for the bookmark. The “bookmark”, in this case, is the name you wish to assign to the network drive to which you are attached. Click the OK button and the network drive will be mapped to the name you provided in the dialog box. The “bookmark” to the drive will appear in the left pane of the file manager. Each time you boot into Lubuntu, the system will respond to this “bookmark” by attempting to connect to the drive to which it points. If the drive is found, then clicking on this “bookmark” will display the contents of the network drive. You can rename or remove the bookmark by right-clicking it and selecting the desired function. Renaming the bookmark does not affect its ability to connect to the network drive you specified. Next month we'll look at file associations. If a file is associated with an application then the OS will automatically load the application and open the file when you open the file.