Accessing your Unix Files from a Personal Computer

  • Microsoft Windows
  • Apple MacIntosh OS X 10
  • Linux
  • The lab file server (Nitrogen) holds your lab files.  On all the shared Unix systems this directory is named /usr/users/{username} where "{username}" is replaced with your username (of all things!).  When you log on this directory is your "home" directory.  This area is backed up every week and some of these backups are preserved for quite some time.  In fact, the first backup of December is kept "forever".

    While all the directories of all lab members are shared, en mass, with our shared computers, this cannot be done for personal computers.  This limitation arises from the need to protect your files from accidental or malicious damage. On the shared computers there is clear responsibility for who has "root" privilege and that person has assumed the responsibility of becoming knowledgeable enough to protect the assets of the lab.  

    To allow you to access your files on the file server from your personal computer we have installed a separate software package which allows you to access your files, alone, by entering a password known only to you.  Since you cannot access files which belong to others in the lab, you cannot accidentally destroy their work.  The software we use is called Samba and implements the file sharing protocols used in the Microsoft Windows world.  Since Windows use is so wide-spread, most other computer systems can access file shares in the same way.

    The problem is that each version of each operating system seems to have differing ways of acquiring access to a Windows style file share.

    Before you can mount your files using this technique I will have to configure the file server to allow such access to your account.  Get your request to me, e-mail usually works the best, and I will create a password for you.  To change this password to something private (a very good idea) you must log onto Nitrogen itself and use the smbpasswd command.

    Microsoft Windows

    There are several ways to connect to a file share using Windows.

    Apple MacIntosh OS X 10

    Under the Go menu in the Finder, select "Connect to Server...", then type "smb://nitrogen/username" (replacing "username" with something more appropriate). Type your smb password in the dialog box that comes up. An icon for your home directory should now be located on your desktop.

    Linux

    Before you can mount a file share on your linux system you must install the Samba Client.  The procedure for doing this will depend on the particular distribution of linux you have, and this software may already be installed.  If you type the command "smbmount" and do not get a "file not found message" you are in good shape.

    The following command will mount your home directory at the mount point /usr/users/dale.  I strongly suggest that you replace "dale" with your username.  You can select a mount point anywhere you want, but mimicking the location on the shared computers will reduce the change that problems will arise in scripts which refer to files with a hard-wired directory location.  This command will prompt you for your file sharing password.

    smbmount  //nitrogen/dale /usr/users/dale -o username=dale,rw

    You can place this information in /etc/fstab for your convenience, but you will then have to worry about the exact method of entering the password.  You should never write your file sharing password in any open file, such as /etc/fstab, nor should you type it a part of a command line.  The command line is visible to all users on your system, and you may not know who is on your system. Break-ins do occur.  There is an option for specifying a "credentials" file in which you can put the username and password and protect that file from access by anyone but root.  Of course, if your root account is compromised this does not help.  I would prefer that you never record your password, and type it in every time you mount your file share.

    You can find more information on the man page for smbmount.



    Dale Tronrud, July 2, 2003
    webmaster@www.uoxray.uoregon.edu