Samba Servers
Most research groups have set up a Samba server for their own use ... ask your system group representative for more information.
If your research group doesn't have one of their own and your Samba use will be limited, you can use the departmental Samba service that is available on the machine samba.cs.kuleuven.be
This (departmental) server is in the DEPTCS (Windows) workgroup.
It shares (a.o.) the departmental printers and
the home1 share which contains user directories to store
files and that can be used to synchronize from/to within Microsoft Windows 2000/XP.
(cfr. below)
These user directories are also accessible on the departmental Unix/Linux
machines via NFS in /cw/samba
Please take a moment to
consider the access rights on your directory in /cw/samba. Do you want
everybody to access the files in it, or only your research group, or
only yourself?
Use the appropriate chmod command to change the permissions.
See also the section about quota's and access
rights for more information.
Samba Users and Passwords
The SMB protocol uses a different way of encrypting passwords
and therefore, the usual Unix/NIS password cannot be used to
connect to a Samba server.
You can change
the password you need to use with a Samba server yourself.
Please keep in mind that allthough your user name is
the same, the password needs not, and should not, be the same as
your usual Unix/NIS password.
Connecting to a Samba Server
Each Samba server exports (i.e. makes available) at least one share. You connect to such a share and then use it as if it were on your own local computer. Such a share is either a directory, or a printer. Directories contain files/documents, printers can be used to print files/documents ;-)
You can of course find out what shares are available on a specific Samba server:
-
On Microsoft Windows, the easiest way of doing this, is by
using the Run option of the Start Menu: type
\\server-name.cs.kuleuven.be in the dialog window and
press Enter ... give your user name and password on the Samba
server when/if asked for.
-
Using other mechanisms to list the available shares might not
succeed because of user name / password problems; Microsoft
has not implemented a consistent API in all aspects of the Windows
user interface and thus your success depends on the way you do it ...
sometimes you are not given the opportunity to specify a different
user name or password and the connection just fails.
- On Linux you can use the smbclient -L server-name command, with the -U user-name option when/if needed.
You will be presented a list of names of available shares. Use these share names to connect to.
Printer Shares
-
On Microsoft Windows, shared printers are used by connecting to them by
means of the Add Printer wizard.
- You can do this either manually, step-by-step for each printer:
Start the wizard and select a Network Printer as opposed to a Local Printer in (one of) the first steps. You might need to establish a samba connection first, as described above, to be able to configure the printer you want. The Add Printer wizard browses anonymously and our Samba server(s) do not allow anonymous browsing.
- Or all-at-once, in one go everything you need:
Since you need a samba connection anyway, you can drag and drop the desired (Samba) shared printer(s) from the window you get by connecting to the Samba server to your Control Panel -> Printers and Faxes window.
You can select all the printers you want and then drag them all together in one operation. This drag-and-drop operation invokes the Add Printer wizard behind the scenes.
Printers installed in this way are configured as they should. There is no need to change any setting unless you really know what you are doing.
Each time you want to print, you need to open a connection to the Samba server before submitting your print job. You can create a shortcut to \\server-name.cs.kuleuven.be on your Desktop to do so.
If you are having problems with the printers, consult this step-by-step guide.
Or this guide for adding samba printers on Windows 7 Windows 7 samba printers.
- You can do this either manually, step-by-step for each printer:
-
On Linux and MacOS-X the preferred way of printing is using
the CUPS printer spooling system.
- This will only work though if your local login name is the same as your departmental login name because printer-accounting will prevent your local login name from printing otherwise.
- If however your local login name is different than your departmental login name, you can/should consider to configure the printers using Samba / smb.
Directory Shares
You connect to such a shared directory on a Samba server by means of:
-
On Microsoft Windows there are a number of ways ... use the one you like most:
-
the Map Network Drive option in the Windows
Explorer (please note that this is not the same as the
Internet Explorer),
-
The server (or its workgroup) might not be in the initial list
that is presented ... you might have to explicitly specify or
search for it.
-
the My Network Places / Network Neighbourhood
icons on your desktop
-
Again, you might have to specify or search for the server
in question.
- the \\server-name\share-name notation in any File Open dialog window,
- the \\server-name\share-name notation in the Run option of the Start Menu
- the net use command in a command prompt window.
-
the Map Network Drive option in the Windows
Explorer (please note that this is not the same as the
Internet Explorer),
- On Linux, you can use the smbclient command or the smbmount utility (see the corresponding man pages).
When connecting, by default the user name with which you logged into your own computer will be used. If this is not what you want, you need to specify the user name to use explicitly.
- On Microsoft Windows, also the password with which you logged in locally, is used when connecting ... only when the connection with the local user name / password combination does not succeed, you will be asked for a different set of credentials.
- On Linux, you are always asked for your password ... passwords are never remembered, not even in RAM ;-)
Synchronizing Directories with/on Samba Servers
With/On Microsoft Windows 2000 and XP, you can automatically synchronize directories on you own local computer, with directories on the Samba server. In this way, you are always sure that the same version of your documents exists on both your own computer and the Samba server. This might be a perfect backup strategy since the Samba servers are always available and thus can be backuped more efficiently.
Such synchronized directories are available off line such that you can continue working on/with your documents even when not connected to/with the Samba server. Once the connection is restored, the (documents in the) local directories are synchronized with the ones on the Samba server, such that the latest version is stored on both of them. When a conflict arises (i.e. new versions of the same documents on both your local computer and on the Samba server), you are notified of this conflict and are asked which version to keep.
You create such a couple of synchronized directories, by
connecting to a share on a Samba server. Once connected, you
select the appropriate directory on the share, pop up the
context menu with your right mouse button and
select Make Available Offline. From then on, you will
find a synchronization icon in your System Tray. You can
also use the Start -> Programs -> Accessories ->
Synchronize tool to check/synchronize your directories at
will.
If the Make Available Offline option is not available in the context
menu, you need to enable it with Tools -> Folder Options ->
Offline Files -> Enable Offline Files.
Also notice that Microsoft Windows can ask you to synchronize when logging out
and/or shutting down. This of course only works when logging out and/or
shutting down ... not when suspending. If you mostly
suspend your computer, you shouldn't forget to synchronize explicitly
regularly.
Once such a synchronized couple is created, you should store all your important files/documents in them, such that they are uploaded/downloaded to/from the Samba server automatically. Do remember that only the files in such a synchronization couple are synchronized automatically ... the rest of your local hard drive(s) is not !
Disk Quotas and Access Rights on Samba Servers
A shared directory on a Samba server of course uses disk quota to control the amount of disk space each user can use, in the same way as any NFS shared directory on an NFS server. You cannot use more disk space as allowed by your quota. Ask the system group representative of your research group for more quota when needed.
In the same way as any NFS shared directory, you will only be able to write to a Samba share in directories in which you have write permission. The first time you want to use a Samba share, such a directory must probably be created for you. Ask the programmeur van week to do so.
The access rights on the Samba shared directory are by default read/write for yourself and read only for everybody else. You can change these access permissions in the usual Microsoft Windows way : right click a file or directory, select Properties and then Security.
You can change the access rights for yourself, for your (NIS/Unix) group and for everybody else. Please make sure to also check the Advanced rights, since not all is always shown on the basic view. Also note the difference between access rights on a directory and rights on the files in that directory.
Remember that NFS and Samba share the same access permissions :
neither gives you, or anybody else, more/less rights than the other.
So by limiting access via the one, you also limit access by the other.
Moreover, all files in the Samba share(s) are also available by NFS
(at least on the Samba server itself, possibly also on other machines,
depending on the configuration of NFS on the machine in question).

