NUS Logo  
NUS Home | Search: in
 
SoC NOC Logo
Home
UserID: Password:

Site Navigation

NOC Home

Other links

SoC Homepage
MySoC Intranet
Student Intranet
Staff Intranet
NUS Homepage

About NOC Web

Accessing NUSNET with Linux

This guide is for people who want to setup and configure their Linux system to access their NUSNET home directories and print to printers in SoC. These instructions are written for and tested on a Red Hat Linux 8.0 system installed with Samba 2.2.5 (distributed in Red Hat Linux 8.0). As Linux distributions and software evolve rapidly and differ from distribution to distribution and from version to version, you may have to modify the examples to cater to your specific configuration.

These instructions assume that you have:

  • a working Red Hat Linux 8.0 system
  • Samba 2.2.5 installed (for Red Hat Linux 8.0, make sure that the packages samba-client-2.2.5-10, samba-2.2.5-10 and samba-common-2.2.5-10 are installed)
  • networking configured and working

Setting up Samba

Samba Configuration File

There are a few things you need to add to the Samba system-wide configuration file so that you don't have to keep specifying certain arguments every time you use the various Samba commands.

  1. Login as the root user.
  2. Open the file /etc/samba/smb.conf with your favourite editor.
  3. Under the [global] section, modify the workgroup variable to reflect your NUSNET domain (NUSSTF for staff, NUSSTU for students). E.g.,
    workgroup = NUSSTF
  4. Set the server string variable to anything descriptive of your notebook. E.g.,
    server string = Zit Seng's notebook
  5. Set your WINS server to either 137.132.1.60 or 137.132.1.63. E.g.,
    wins server = 137.132.1.60
    Make sure that the wins support variable is commented out.

Permissions of Samba Commands

If you want to connect and disconnect (known as mounting and unmounting in UNIX terminology) NUSNET directories while logged in as a normal user, you need to setuid to root the smbmnt (invoked by smbmount) and smbumount programs. This is because these commands work only when invoked with root privileges.

chmod 4755 /usr/bin/smbmnt
chmod 4755 /usr/bin/smbumount

It is always best to login to your computer as a normal user, and switch user to root only when you need to perform system administration tasks.

Setup Printer Queue

  1. Login as the root user and run printtool.
  2. Click New.
  3. Click Forward.
  4. Enter a queue name. To avoid confusion, it is best to choose the same name as the actual UNIX print queue (e.g., psmr).
  5. Click Windows Printer for the queue type, then click Forward.
  6. For the Share, type the Windows share name of the print queue. This will be //NTS09/ (for SoC staff only) or //NTS27/ (for students and non-SoC staff) followed by the name of the print queue. E.g., a staff user's Windows share for the psmr printer will be //NTS09/psmr.
  7. For the Host IP, type 137.132.90.35 if you used NTS09 above, or 137.132.90.37 if you used NTS27 above. For the workgroup, type NUSSTF or NUSSTU (staff or student respectively).
  8. Type your NUSNET userid in the User field, and your NUSNET password in the Password field.
  9. Click Forward to continue.
  10. Select Postscript Printer, then click Forward to continue.
  11. Click Apply.
  12. Make sure this new printer is selected, then click the Edit button.
  13. Click on the Driver Options tab.
  14. For the Page Size, select A4. Then click OK.
  15. If you want to make this printer the default printer, make sure it is selected, then click the Default button.
  16. From the menu bar, click File → Save Changes.
  17. Then click File → Restart lpd.

Printing

You can now print using the standard UNIX print commands, optionally specifying the name of the print queue if you want to print to a printer other than the default. For example:

lpr -Ppsmr somefile.ps

Remember that you must send postscript content to the printers. You can send plain text content too, but definitely not Microsoft Word documents or the likes. This is no different from how you would print from any of SoC's central UNIX servers. On some Linux systems, there are 'magic filters' that help you convert from various file formats to postscript automatically so that, for example, you could send a GIF file to lpr and it will print correctly. Your mileage will vary; experiment on your system!

There is no way to check on the status of the actual print queue from your own system. In particular, a command like lpq -Ppsmr on your computer is only going to tell you the print status of the queue on your computer. Since you are printing to a remote print server, your print job will be delivered to the destination almost instantly and queued remotely.

Accessing Home Directories

Accessing or connecting to a NUSNET directory is the UNIX equivalent of mounting a directory. You can access the contents of your NUSNET home directory as if it were a directory in your computer.

You need to know the name of the network path to your NUSNET home directory. This is made up of two parts: the name of your home directory server, and the name of the share that contains your home directory. The server is NTS09 for all SoC staff and NTS27 for all SoC students. The share name is made up from the first few characters of your NUSNET userid. For staff, this would be the first 3 characters of your NUSNET userid. For students, this would be the first 4 characters of your NUSNET userid (e.g., iscp, isc1, isc9, etc).

To mount a directory, create the directory mount point and run smbmount //server/share mount-point -o username=nusnetuserid.

The following commands would be used by a SoC staff with the NUSNET userid comuser:

cd ~
mkdir nusnet
smbmount //NTS09/com nusnet -o username=comuser

The following commands would be used by a SoC student with NUSNET userid isc09999:

cd ~
mkdir nusnet
smbmount //NTS27/isc09999 nusnet -o username=isc09999

You will be prompted for your NUSNET password. Your NUSNET home directory would then be found at ~/nusnet/nusnetuserid where nusnetuserid is your actual NUSNET userid. When you are done using this directory, unmount with these commands:

cd ~
smbumount nusnet

This is the general method for accessing any NUSNET and/or Windows share. For example, to access your SoC UNIX home directory, use these commands:

cd ~
mkdir unix
smbmount //stfsambahost/socuserid unix -o username=nusnetuserid

Substitute socuserid with your SoC UNIX userid and nusnetuserid with your NUSNET userid. Notice that both your SoC UNIX and NUSNET userid are required. You will be prompted for your NUSNET password. Your home directory will then be found at ~/unix. When you are done using this directory, unmount with these commands:

cd ~
smbumount unix

Ref: original

SoC Network : NOC | MySoC.Net | Trouble Ticket | SoC Home | NUS Home
© Copyright 2001-2012 by National University of Singapore. All Rights Reserved.
Company Registration Number: 200604346E
Terms of Use | Privacy | Non-discrimination
Last modified on 6 Jul 2007 by School of Computing Network Team