- 1 Using the department fileserver
- 2 Accessing files on the DFS-Root
Using the department fileserver
In order to use the guides below, you'll have to know on which servers the windows shares reside. The easiest way is to use a Windows PC, start up Explorer, got to the share and look at the Properties.
Alternatively, you can use smbclient to find all shares on a server:
- smbclient -I <server>.wurnet.nl -W wurnet.nl -U yourname001 -L <server>
Where <server> is scomp0300 for PSG and scomp0291 for ESG.
Using smbmount (normal user)
Suppose the server your personal share is located on is called sdep001 and your username is annie001, your password is annie, and you want to mount this share on ~/mnt If you do not know this information you can get it out of the ActiveDirectoryServer or from the "My Computer" screen of a windows machine.
- smbmount '//sdep001/annie001$' ~/mnt/ -o username=annie001,password=annie,workgroup=WUR
if you leave out the password, the program will ask you for your password during the mounting:
- smbmount '//sdep001/annie001$' ~/mnt/ -o username=annie001,workgroup=WUR
Using mount (as root) =
you can also do this using regular mount, as Stephan Verrips writes:
- mount -t smbfs -o username=verri001,workgroup=wurnet.nl //sdpw0001.wurnet.nl/verri001$ ~/mnt
Alternatively, the (newer) CIFS protocol can be used instead of SMB. The following example connects to the 'webdocs' share where web related files can be stored.
- mkdir /mnt/webdocs
- mount -t cifs -o username=annie001,workgroup=wurnet.nl //skgr0004.wurnet.nl/webdocs$ /mnt/webdocs
Automatically mounting at boot (/etc/fstab)
Add the following line to the file /etc/fstab
//sdep001/annie001$ /mnt/wur smbfs username=annie001,password=annie,workgroup=WUR,uid=502 0 0
or a really working example for a shared network drive (for DPW - note the odd spaces in the name using \040):
//scomp0300/PSG~DPW\040Laboratory\040of\040Nematology$ /mnt/wur smbfs username=annie001,password=annie,workgroup=WUR,uid=501 0 0
//scomp0300/PSG~DPW\040Laboratory\040of\040Nematology$ /mnt/wur smbfs //username=annie001,password=annie,workgroup=WUR,uid=501 0 0
The uid represents the user id you use - check your id with the id command:
it is also possible to use a gid (group id) to share the mounted drive with multiple users on one system.
Note: since it contains your password this option is not so secure!
Safer is to use a separate password file:
- cd ~
- echo username=annie001 > .smbpassword
- echo password=annie >> .smbpassword
- chmod 600 .smbpassword
This created a hidden password file that can only be read by you or the root
Change the line in the /etc/fstab into
- //sdep001/annie001$ /mnt/wur smbfs credentials=/home/annie/.smbpassword,workgroup=WUR,uid=502 0 0
Note: you set the uid to your user id (see 'man id') so you can write/read from your normal account.
Another example, again using the CIFS protocol instead of SMB, to automatically connect to the 'webdocs' share:
- //skgr0004.wurnet.nl/webdocs$ /mnt/webdocs cifs credentials=/home/annie/.smbpassword,workgroup=wurnet.nl,uid=502 0 0
Windows shares can also be accessed, without any mounting, with the SMB kio slave (KDE). The SMB kio slave can be used in Konqueror but also in other KDE applications.
The format of the url is:
- username: wur\annie001
- hostname: sdep001.wur.nl
- sharename: annie001$
If you get the error "Connection to .... failed" and you are sure you typed the server name correctly, you have to manually set the wins server in /etc/samba/smb.conf. Find the line that reads like:
- ; wins server = <something>
Remove the ; and change the <something>:
- wins server = 10.110.10.3
You can also connect to the fileservers with WebDAV. GNOME and KDE both provide GUI's for doing that. In GNOME you can open the GUI with Connect to server... under Locations. In KDE you have to open konqueror and type "remote:/". Then click on the "Add a Network Folder"-icon.
Select the encrypted WebDAV(s)-type Then fill in the fields
- Server = wic2.wur.nl
- Port = 443 (or use encryption)
- Folder = ANNIE001_annie001
- User = annie001
- Name = anything you like
Accessing files through the web
Accessing files on the DFS-Root
What is the DFS-Root
DFS is Microsoft's Distributed File System. The purpose of a distributed file system is that the user can access files without knowing on which server the files are locates. The root of a distributed files system is called the DFS-Root. In the DFS-Root are virtual directories which are actual 'links' to shares on some servers.
In WURNET there is one wur-wide DFS-Root \\wur\dfs-root usually mapped to the W:-drive in windows.
The samba client is unable to directly access files in the DFS-Root, instead you have to connect to the actual underlying shares.
DFS-Root directory mappings
If you have access a file or directory in the format:
\\wur\dfs-root\dir\rest\of\path or W:\dir\rest\of\path
then you must substitute \\wur\dfs-root\dir or W:\dir according the following table (Dir -> share):
- AFSG = //ATO0001C/AFSG$
- APPS = //SCOMP0025/apps
- ASG = //LD010s/ASG$
- ATV = //SATVF0001/shares
- BC = //SCOMP0064/BC
- DPT-DIER = //SCOMP0064/DIER
- DPT-MAATSCHAPPIJ = //SCOMP0063/MAATSCHAPPIJ
- FB = //SCOMP0064/FB
- LEI = //LEIDH017S/SHARES
- PLANT PROJECTS = //SPRI0010/PLANTPROJECTS$
- RIKILT = //SCOMP0063/RIKILT
- STUDENT = //SCOMP0064/STUDENT
The spaces in the names have to be escaped, using \040.