# Computing Resources

## Contents

2. Software
3. Network
4. Web
5. Email
6. Printing
7. Scanning
8. Using Linux
9. Visitors

### General

#### How do I change my password?

Most linux and unix desktop workstations use ms as an authentication server. If you change your password on ms (no longer mathserv), it will be changed on all other systems.

NB: it may take up to ten minutes for password changes on the main server (ms.mcmaster.ca) to be reflected on the workstations and the compute servers.

On linux workstation or Macintosh, open a terminal or console window ...

>ssh ms
>passwd

From Windows, use an SSH client such as MobaXterm or PuTTY.

To create a hard-to-crack password ...

1. use a phrase of at least two words
3. use at least eight characters

We periodically run password-cracking programs ourselves in order to probe for weak passwords and will notify you if your password is too easily guessed.

#### How can I access my home directory from home or a laptop?

If you login to any departmental linux or unix workstation you will find that you have the same ms home directory (with very few exceptions). From any other computer, whether on campus or off, you can access your files by sftp (secure file transfer protocol) or smb (Windows) networking.

SFTP - Secure File Transfer Protocol

Secure ftp will work from anywhere. A good Windows sftp client is PuTTY psftp. From a linux or OS X computer, you can use the command-line sftp or a graphical client such as secpanel (linux) or Fugu (OS X). If you are using either KDE or Gnome under linux (or any other unix), then you can connect to sftp://username@servername/ in konqueror or nautilus, respectively.

Windows Server Shares

Your home directory on ms is available via Windows file sharing (SMB):

Windows
Click Start, Run and enter  \\ms.mcmaster.ca\username
Linux
In recent releases of KDE and Gnome, use konqueror or nautilus (respectively) and enter  smb://ms.mcmaster.ca/username
OS X
Click Go, Connect to Server in the Finder and enter  smb://ms.mcmaster.ca/username

NB: Most residential and many institutional/corporate service providers (including Cogeco and Sympatico) block SMB, so you will first need to make a Virtual Private Network connection; UTS has VPN information and instructions.

#### What is the name of my computer?

A system administrator may ask you what your linux or Macintosh computer is named if you are asking for help. The name is displayed at the login screen or you can look it up with the command hostname.

The standard linux workstations used by most graduate students and postdocs have names of the format ms-bldg-room-desk; for example

ms-hh-214-03
ms-hh-401-11

#### What are the "standard linux workstations" systems?

Documentation and computing-news blog entries often refer to the standard linux workstations or ms workstations. This refers to the Dell GX270 linux workstations used by graduate-students, postdoctoral fellows and some faculty members. The grad student and post doc workstations are named for their location (e.g. ms-hh-303-04 for the Math & Stats workstation at desk 4 in HH-303).

#### Can I check the backup status of my workstations?

If your workstation is backed up by RHPCS, you can determine when the last backup was done, how long it took, and how much was backed up by entering the hostname here.

#### Can I access backups of the files in my network home directory?

The home directories on ms are backed up every night and we keep a four-week archive of changed/deleted files. The backups can be accessed on ms in

The folder Latest is a copy of your home directory from the previous night's backups; the dated folders contain files which were replaced or deleted by backups.

You can browse your backups ...

• via the terminal
• ssh ms
• via sftp
• via Windows files sharing
• in OS X: Finder -> Go -> Connect to Server ... -> smb://ms.mcmaster.ca/HomeDirectoryBackups/username
• in linux: Alt-F2 -> smb://ms.mcmaster.ca/HomeDirectoryBackups/username
• in Windows: Start -> Run -> \\ms.mcmaster.ca\HomeDirectoryBackups

#### Can I access backups of other files?

See above for access to backups of files from your network home directory. You will need to contact the system administrators in order to recover backups from other systems backed up by RHPCS; make sure to specify 1) the name of the file or folder, 2) the directory in which it is to be found, and 3) the date of the last known good version of the file or folder.

#### My mouse doesn't work; can I have a new one?

If your mouse isn't working properly it most likely needs to have its rollers cleaned; here are instructions. Hint: there should be two black rollers and one white roller, not three stripy grey rollers. If cleaning doesn't help or if your mouse is not working at all, let us know and we'll get you a knew one.

### Software

#### What math and stats programs are available?

Your standard workstation has a number of math and stats applications, such as Maple, MATLAB and R. These same applications as well as some others, such as SAS, are only available on certain compute servers. See the Software page for more information.

#### How can I run Maple/MATLAB/SAS/R etc. on my laptop or home computer?

Some applications, such as R, can be installed on your own computer at no charge. Other applications must be purchased; in some cases, such as MATLAB and Maple, there are less expensive student editions available at the McMaster bookstore.

Any of the programs on the standard workstations or compute servers can be run remotely. If you are connecting from off-campus, graphical applications will run slowly; a text mode, if available, is generally preferable.

To run graphics applications, you will need to have X11 installed. X11 comes with linux and Mac OS X. Windows users can install cygwin to get X11; note that using X11 on Windows is not trivial.

You can run applications in text mode (e.g. R, MATLAB in console mode, Maple in console mode) simply by connecting to a workstation via ssh. Linux and Mac OS X both have terminal programs and ssh built in. PuTTY is a simple and free ssh/terminal program for Windows.

Note that the workstations and compute servers are not directly available from off-campus computers. You can either 1) ssh to ms.mcmaster.ca first and the ssh to the workstation or server, or 2) make a VPN connection to the campus network.

Example

From an X11 terminal window under linux or OS X
ssh ms.mcmaster.ca
ssh ms-hh-305-11
matlab-console

From Windows, run PuTTY and connect to ms.mcmaster.ca, then run
ssh ms-hh-305-11
maple

### Network

#### How do I setup a VPN connection using the Cisco client?

UTS has instructions for using the recommended Cisco client under Windows XP, OS X and linux.

#### How do I setup a VPN connection using the built-in OS X client?

You can use the VPN software built into OS X 10.3 or greater instead of the Cisco client. The former is simpler to use but times out after two hours; the latter times out after eight hours.

To set up the McMaster VPN connections using the built-in software:

• open Applications, Internet Connect
• click VPN
• check "Show VPN Status in menu bar"
• choose PPTP
• from the Configurations drop-down menu, choose Edit Configurations...
• configure two connections as show below:

You can now select a configuration and connect and disconnect using the VPN icon ( ) on the status bar.

Recall that MacVPN is used to connect to McMaster's network from an off-campus network; MacConnect is used to connect to the Internet from a MacConnect public network port or the MacConnect wireless network.

#### How do I find out my Ethernet address(es)

Instructions here.

### Web

#### How do I create a personal Web page?

See the instructions on the Web section of the Math Computing site.

#### How do I change my information on the People page?

The information on the core Web site (including the People page) is maintained by the office staff. Contact Julie Fogarty .

#### Mozilla/Netscape/Firefox says that my profile is already in use, but it isn't; how do I correct this?

The Mozilla-based browsers (mozilla, firefox and netscape) use lock files in ~/.mozilla to make sure that only one session is using your profile at a time. If your browser crashes or otherwise stops without closing down properly, the lock file isn't removed and subsequent sessions will refuse to use your default profile. You can remove the lock for these applications with the following commands.

• clear-firefox-locks
• clear-thunderbird-locks

#### My Firefox bookmarks and history are gone and I can't use the back button; how do I fix this?

Starting with version 3.0, Firefox uses a database to manage bookmarks, history, etc. and this database can be corrupted, resulting in

• bookmarks being lost
• history being lost
• Back and Forward buttons not working

The problem is addressed on the Mozilla supprort forums.

##### This simplest fix is ...
• close all firefox windows
• open a terminal/console window and remove places database
• cd ~/.mozilla/firefox/*.default
• \rm places.sqlite*
##### If this does not recover your bookmarks, then you will want to recover them from backups, which is a little more complicated ...
• close all firefox windows
• open a terminal/console window and remove places database
• cd ~/.mozilla/firefox/*.default
• \rm places.sqlite*
• look at the copies of your places database in the backups
• ssh ms
• cd /usr/local/msbackups/home/whoami
• ls -lth */.mozilla/firefox/*.default/places.sqlite
• copy the most recent version of the largest places.sqlite file to your firefox profile folder; for example
• cp -p {2009-12-01,~}/.mozilla/firefox/sbjioi3p.default/places.sqlite

#### Mozilla says that it 'cannot use the profile....because the directory containing the profile cannot be found.' How do I fix this?

Mozilla profiles are associated with the canonical path name; if that changes, mozilla loses track of it. For example, your server home directory will always be accessible via /net/ms/home/username, but if we move the folder to a different disk, mozilla will still look on the first disk.

The simplest was to sort this out is to remove the file appreg from your .mozilla folder and then re-add your existing profile; here's how:

1. Note the name of your profile, either by starting mozilla or running the command find-profiles mozilla* on any of the msprime systems. Close mozilla again before you continue.
rm ~/.mozilla/appreg
3. Start mozilla with the command mozilla -ProfileManager.
4. Click 'Create Profile..', enter the exact name of your existing profile, and then click Finish; instead of creating a new profile, your existing one will be re-added with the path name corrected.

* If you are on a system on which the find-profiles command doesn't exist, you can use this command instead:

find ~/.mozilla -maxdepth 1 -mindepth 1 -type d | egrep -v "firefox|plugins"

#### How can I check my web site for broken links?

 ssh ms cd ~/public_html/ umask 022 mkdir .linklint linklint -doc linklint -http -host www.math.mcmaster.ca /~username/@

For full documentation, see the linklint site.

#### How can I make a folder browsable?

By default, the web server will only allow users to view pages for which they have given a specific URL (e.g. ) or index.html or index.php pages implied by specifiying directory names (e.g. http://www.math.mcmaster.ca/mathcomputing/, which impies http://www.math.mcmaster.ca/mathcomputing/index.php). If you want users to be able to browse the contents of a web folder (like so), put the following line in a file called .htaccess in the folder:

Options +Indexes

That folder and all folders below it will be browsable.

For full details, see Options Directive for .htaccess at apache.org.

#### How can I protect a folder with a username and password?

In order to require a username and password to access part or all of a web site, you need to 1) create a password file and 2) create a configuration file in the folder to be protected.

1. Create a password file (htpasswd)
1. umask 022
2. mkdir ~/etc
3. htpasswd -c ~/etc/htpasswd username_of_your_choice
4. chmod 711 ~ ~/etc ~/public_html
2. Create a configuration file to protect the folder (.htaccess)
1. mkdir -p ~/public_html/folder_to_protect
2. cd ~/public_html/folder_to_protect
3. pico .htaccess AuthType Basic AuthName "Restricted Files" AuthUserFile /home/your_username/etc/htpasswd Require user username_of_your_choice (ctrl-x to save) 

A few notes:

• The two mkdir commands may complain if the directories already exist; don't worry about that.
• All folders beneath the one with the .htaccess file will also require the username and password.
• You can add additional usernames with  htpasswd ~/etc/htpasswd new_username
• The umask and chmod commands are used to make sure that the password file are readable by the web server.
• If you wish people to see a list of files in the folder rather than an index page, first run the command:
chmod 755 ~/public_html/foldername

... and then add this directive to the top of an .htaccess file in ~/public_html/foldername:
Options +Indexes

For full details, see Authentication, Authorization and Access Control at apache.org.

Yes.

### Email

#### How do I forward my @math.mcmaster.ca mail to another address?

There are two ways to forward your mail to another account: the standard unix .forward file and using procmail rules. You almost certainly want to use the .forward method.

The .forward method is simplest and will take effect prior to any spam filtering, which means that all spam filtering will happen at the destination mail server. This is desirable in most cases so that you don't have two placed to look for filtered spam.

Procmail is a powerful mail filter and we use to to filter out mail flagged as spam by SpamAssassin. If you use procmail, you can do more sophisticated rule-based forwarding and you can have only non-spam forwarded.

Forwarding mail using the .forward file

Create a file called .forward in your home directory containing the address to which you wish the mail to be redirected.

> cd
> echo "myotheremail@otherhost.com" >! .forward

If you wish to keep a copy of the message in your math inbox, add "\yourusername, " in front of the forwarding address:

\myusername, myotheremail@otherhost.com

Forwarding mail using procmail

 :0 * ! myaddress@somewhere.else.edu

If you wish to keep a copy of the message in your math inbox, use ":0c" in place of ":0":

 :0c * ! myaddress@somewhere.else.edu

#### How do I forward my MUGSI/Univmail @mcmaster.ca mail to my @math.mcmaster.ca address?

For MUGSI, see Email Forwarding in MUGSI.

For Univmail:

2. go to the Rules page
3. enter your @math.mcmaster.ca address in the "Redirect All Mail to" box

#### How do I set a vacation message

... and you probably do if your account was added after April 1st, 2008 (if you are using spamassassin/procmail, you will see a file called .procmailrc in your home directory: try ls -la ~/.procmailrc), then you should use procmail to handle your vacation message.

Provided that your .procmailrc file contains the line INCLUDERC=$RHPCS_MAIL_CLEANER/procmailrc-clean (and it probably does, esp. if you account was added after April 1st, 2008), you activate vacation auto-replies like so ... 1. connect to ms.mcmaster.ca via ssh 2. turn vacation on vacation on 3. edit your vacation message 1. either directly with vi, pico or gedit, e.g. vi ~/.vacation/message 2. or copy a file called "message" to ~/.vacation The vacation feature keeps a list of addresses which have arleady received your vacation message (in ~/.vacation/cache) and won't send more than one message to a particular address. #### Why do I have to change my SMTP server when I change networks? The Simple Mail Transfer Protocol (SMTP) does not use authentication, so anyone who can get to the server can use it to send mail, including spammers. Most network providers restrict their SMTP servers to those on their own networks to prevent abuse of their servers by spammers; for the protection of other networks, many providers also restrict access to SMTP servers external to their networks. McMaster, Cogeco and Sympatico all use this double blocking, which means that you can only access internal SMTP (out-going mail) servers when connected to one of these networks. Note that if you make a VPN connection to McMaster, then you are virtually on the McMaster network no matter where you are physically, and so you can use McMaster SMTP servers such as mail.math.mcmaster.ca and smtp1.mcmaster.ca. #### Thunderbird says that my profile is already in use, but it isn't; how do I correct this? Thunderbird uses lock files in ~/.thunderbird to make sure that only one session is using your profile at a time. If thunderbird crashes or otherwise stops without closing down properly, the lock file isn't removed and subsequent sessions will refuse to use your default profile. You can remove the lock file as follows: • close any thunderbird windows • enter the following commands from a terminal window:  killall -9 thunderbird; killall -9 thunderbird-bin find ~/.thunderbird -name lock -exec \rm {} \; find ~/.thunderbird -name parentlock -exec \rm {} \; #### Is this email message real or a phishing scam? Phishing refers to attempts to trick you into sending important information - passwords, banking information, identification - via email or a web form. A common type of phising attempt is a message which informs you that your mail/webmail account is about to be closed for some reason (spam; quota; expiry) and that you must reply with your username and password in order to prevent this. Here is how you can tell a phishing attempt from a legitimate message about your Math & Stats account: 1. messages from me or another sysadmin will always be signed with a proper name, not a generic tag such as "Your McMaster Sysadmin Team"; 2. we will never ask you for your password; 3. if there is a link in the message, check the URL line in your browser carefully after clicking it; if it does not begin with "www.math.mcmaster.ca" then it's not legitimate (the text in the message might be faked); 4. phishing scammers are genearally not native English speakers and the messages are almost always riddled with spelling and grammar mistakes; I like to think that my messages are not. ### Printing #### What printers are publicly available? See the Printers page. #### Where can I print in colour? There is a colour printer in HH-401. Alternatively, these colour printing services are available to the general campus public: #### How many pages may I print for free? See the Printing Guidelines. #### How many pages have I printed? It's not possible (yet) to find that out as a simple number. But you can look up: 1. a list of the jobs and the number of pages printed during previous billing periods 2. a list of all of your print jobs this month and last month. For the record of jobs for previous billing periods, use this web page or run this command on ms or your linux workstation: previous-print-jobs You can see a list of your print jobs for the current and previous months with these commands on ms or your linux workstation: recent-print-jobs --thismonth recent-print-jobs --lastmonth NB: if you run the command recent-print-job on ms, you will see all of your jobs for the month, but all jobs submitted from a linux workstation will show as onlyl 1 page; if you run the command on a linux workstation, you will see the correct page counts, but only for those jobs submitted from that workstation (this is not the case with previous-print-jobs, which uses conflated logs). Yes, a pain, but something we're working on. Why is Acrobat Reader (acroread) not working when I printer using kprinter? Use 'kprinter -c' instead of 'kprinter.' You probably don't really want to know why, do you? Note that Acrobat 8 doesn't require kprinter; it brings up a proper printer-control dialogue box on its own. #### How do I force single-sided printing? Let's assume that you want to print your thesis, a LaTeX file, single sided instead of double sided (which is the default for the public printers). From the command line:  > pslatex thesis.tex > lpr -P hh303lj4300 -o sides=one-sided thesis.ps  Using kprinter, which allows you to select device properties very much as in OS X or Windows: > kprinter file.txt > kprinter file.ps > kprinter file.pdf Using Adobe Acrobat Reader and kprinter:  > pdflatex thesis.tex > acroread thesis.pdf • click File, Print... • "Printer Command:" should be kprinter -c • click OK • wait for kprinter panel to appear • "Print system currently used" should be CUPS • choose printer • click Properties • choose "None" under "Duplex" #### How do I print to transparencies? Only the Lexmark C750 colour printer has a paper tray dedicated to transparencies as 1) most people wish to print colour transparencies, and 2) the other printer print high volumes of paper and can't spare the space. Instructions for printing to transparencies on the C750 are available here. If you wish to print a large number of black-and-white transparencies, the simplest thing to do is to print single-sided paper copies and then photocopy to transparencies in the department office. #### How do I delete a print job? From the command line, use lpq to view jobs in the queue and lprm to remove a job. Note that you need to use the -P flag if you wish to view or remove jobs from a queue other than the default. You can use the command lpqall to view all of the queues. For example:  moylek(107)lpq -P HH303-HPLJ4345 HH303-HPLJ4345 is not ready Rank Owner Job File(s) Total Size 1st moylek 441 STDIN 12288 bytes moylek(108)lpq -P HH303-HPLJ4345 HH303-HPLJ4345 is not ready no entries  Once a print job has been transferred to the printer's memory, you cannot remove it via the lprm command; you'll need to go to the printer and press the Cancel Job button. #### Why does the printer keep asking for custom paper in tray 1? The HP LaserJet printers sometimes flash a message to the effect of "Place paper in tray 1." Tray 1 is the fold-down tray, not one of the two main paper trays, and is where one would normally feed non-standard paper. This message is displayed for two reasons: 1) someone has sent a print job with a non-standard paper size selected; 2) someone has changed the paper types for tray 2 or 3 at the printer console. If the problem persists for more than one print job, it is likely the latter problem and you should contact the system administrator. In most cases, you can simply press the Go or Start button once or twice to force the printer to use the paper in the main trays. This brings up a related question: why is the console not locked? It's left unlocked so that people can make changes when necessary after hours. We trust that people will not mess things up for others; that they sometimes do is the price we pay for having that freedom generally available. ### Scanning #### Where can I scan something? The HP LaserJet 4345 outside of HH-303 has high-speed, two-sided colour scanning capability. Simply place the document to be scanned in the top sheet feeder or on the glass plate, press the E-MAIL button and enter your name (first name first) or email address. The printer scans only one side by default; change the source options to two-sided to scan both sides. The photocopier machine in the department office can be used to scan pages in black and white; the image files will be emailed to you. Contact the office staff for more information. #### What happened to the scanner in the common room? There HP flat-bed scanner has been removed from the common room now that we have the HP LaserJet 4345 available. ### Using Linux #### How do I use Chinese characters? We have been able to get the Chinese Input Manager to work with KDE only. The software is installed on all msxxx workstations but you must activate it by running this script: /usr/local/chinese/install_chinese Once you have installed the software for your account: • set locale to chinese with command localedrake> • logout and login • open a terminal (e.g. rxvt) • scim -c simple -d Please email sysadmin@math.mcmaster.ca if you would like to have this software installed on your non-msxxx workstation. #### How do I open Microsoft Office documents? OpenOffice.org is a full-featured office suite which can open most Microsoft Office documents. See the Workstation Software page for more information. Microsoft Office 2007 - aka OpenXML - files such as .docx, .xlsx, etc. cannot be opened directly by OpenOffice.org. You must first convert the file to OpenOffice.org format using the command odf-converter-integrator. For example odf-converter-integrator assignment.docx #### Gnome or KDE is screwey; how do I reset my Gnome or KDE configuration? The Gnome and KDE desktop environments can get into such a state that they either won't start or start more-or-less uselessly. Or you may just have configured a miserable combination of fonts, colours and desktop images and want to start afresh. In either case, it's simply a matter of logging out, renaming the configuration folder(s) and starting the desktop again. Note that when you reset your configuration, you will lose all customizations made under those environments. For example: resetting your KDE configuration will reset your Konqueror bookmarks and cache, your Kmail settings, and your desktop wallpaper; resetting Gnome will result in your losing your theme settings, your Epiphany bookmarks, and your Nautilus settings. You can restore some of these settings by copying in specific files and folders from the backups made with the commands below. ##### KDE 1. logout 2. press Alt-Ctrl-F1 to switch to a console login 3. login 4. Enter reset-gnome exit 5. press Alt-Ctrl-F7 and login You will now have no .kde folder so KDE will start afresh when you next login; your old settings are in .kde.date_and_time. ##### Gnome 1. logout 2. press Alt-Ctrl-F1 to switch to a console login 3. login 4. Enter reset-gnome exit 5. press Alt-Ctrl-F7 and login You will now have no Gnome folders so Gnome will start afresh when you next login; your old settings are scattered in the various .g* folders; frankly, I'm note sure which are where. But you may well find that you can save some of your settings by doing the following: #### My KDE menu is empty; how do I get it back? We've found that the KDE Kicker (which provides the application menus and the task bar, as well as some of the desktop functionality) occasionally goes wonkey under the current installation of linux / KDE. The two major symptoms are 1) almost all applications are missing from the menu and 2) one can't open files or folders by double-clicking them. The solution is to stop the Kicker, reset the configuration, and then restart the Kicker. You can do this like so: 1. press Alt-F2 and enter the command xterm to open a terminal window 2. cd 3. killall -9 kicker 4. mv ~/.config ~/.config.backup 5. \rm -r /var/tmp/kdecache-$USER
(ignore any error or warning messages)
6. kicker

#### I can't open files by double-clicking in KDE; how do I fix this?

This is another symption of the kicker problem described above; use the same solution.

### Visitors

#### I am a long-term visitor; how do I get an account for the departmental systems?

A departmental account will let you login to the linux workstations found in many visitor's offices as well let you print to the shared printers from your laptop. Your host should contact the system analysts and let them know your name, the date you will be arriving and the date you will be leaving.

#### I am a faculty member who will soon have a visitor; what can I arrange in advance?

You can arrange for:

• wired and wireless network access for laptops in Hamilton Hall; see "Short-Term Visitss" at Network Access for Visitors' Laptops
• wireless access via MacConnect (for Hamilton Hall as well as many other buildings); see below
• access to ms, the linux workstations and the shared printers; contact the systems analysts to arrange for an account

#### How do I arrange for MacConnect access for one or more visitors?

The MacConnect network (which has wired and wireless connections throughout much of the campus) is managed by UTS.

Visitors who are hear for a matter of weeks may borrow one of the guest Mac ID accounts from the main office staff.

For long-term visitors or for a group of four or more visitors, send email to uts@mcmaster.ca and specify:

1. the number of accounts you require
2. the arrival date
3. the departure date

#### I am a visitor; where can I print and scan?

There are shared departmental printers on the network in Hamilton Hall, but note that: 1) printing is not free and your host will be charged for your printing; 2) you will require an account on the departmental server; and 3) connecting to the queues from a laptop is a bit fiddly. If you are going to be using one of the linux workstations found in some visitors' offices, then items 2 and 3 are not a problem.

If you wish to print from your laptop, you have three options:

1. ask your host to request a departmental account from the systems analysts and then connect to the printers once you arrive
2. use the black-and-white or colour printers at the MSU Underground Media & Design, operated by the Student Union
3. use your hosts office printer (if your host has one, of course)

Scanning is much easier and free.