Enquiry : Mr.Jason Chan (mwchan@phy.cuhk.edu.hk, Rm348)
Your login shell should be a C-Shell (csh), every time you login, a file ".login" in your home directory will be executed. Also, each time you create a new shell or terminal, a file ".cshrc" will be executed.
During login process : execute .login --> execute .cshrc --> give you a prompt
Run a new "csh" or "xterm" process : execute .cshrc --> give you a prompt
Use any text editor to add any task you want to invoke every time you login or create a new shell by modifing .login & .cshrc
e.g. If I want to invoke a program "newmail" once (tell me when a new mail arrived) when I login :
Add a new line in .login, then type : newmail
e.g. If I want to set IMSL environment variables in all C-Shell that I created :
Add a new line in .cshrc, then type : source /imsl.csh
After modifications, you can take the changes immediately by :
> source .login
> source .cshrc
Login sun1, type "quota -v". You will see the soft-limit, hard-limit & your current disk usage in KiloByte.
If you exceed the soft-limit, the system will give you 24 hours to clean up some files. After 24 hours, your account will be locked if the usage is still over the limit.
If you exceed the hard-limit, the system will lock your account immediately.
Please ask Mr.Jason Chan (Rm348, Ext6308) for help if your account is locked.
Change your password by this command : yppasswd
Some Rules on your Password :
1. Don't use your login name, room no, phone no or any single word in dictionary
2. Must be longer than 5 characters, NOT pure numbers or letters, should be mixed
3. Change your password every certain period
4. Don't give your password to other people
You can get informations of a person on the network by using "finger" (e.g. finger kkchan)
You can also let others know more about you & your current work when someone "finger" you!
You can create two files .project & .plan in your home directory, then those informations will be printed when someone try to finger you. e.g. :
In .project file (only one line information) :
AstroPhysics Research Term
In .plan file (can be multi-lines) :
My office location : Rm123 of Science Center
My phone number : 2609-1111
I always smile :-)
There are 5 HP laserjet printers, 2 color deskjet printer and 1 color laserjet printer connected to the network :
Printer Location Charges/Page Color/BW? Postscript? -------------------------------------------------------------------- lj326a Rm326 HK$0.3/A4 BW Yes lj328 Rm328 HK$0.3/A4 BW Yes lj216 Rm216 HK$0.3/A4 BW Yes lj204 Rm203a HK$0.3/A4 BW Yes ljg11 RmG11 HK$0.3/A4 BW Yes dj326 Rm326 HK$1.0/A4 Color No dj216 Rm216 HK$1.0/A4 Color No clj108 Rm108 (Gen.Office) HK$4.0/A3 Color Yes
You can use "lpr" to print file
For example, print a file on lj326 :
> lpr -Plj326 myfile
Check the print job on the lj326 print queue :
> lpq -Plj326
Delete print job :
There is a control PC beside the laserjet printer, you had to delete your print job from the control PC. Press [F1], select your job, then press [Del]
When you press [BackSpace], it can erase the previous character, but ^H or ^? instead, you can simply correct this error by : Press [Enter] [BackSpace] [Enter]
If you find many strange characters occur on your terminal, it is most properly that you have set a wrong terminal type, please try :
On SUN Terminal : > set term=sun-cmd
On HP Terminal : > set term=hp
On other terminals : > set term=vt100
Forward incoming emails to other places :
Create a file ".forward" in home directory, add the email address(es) in this file, then set home directory to all executable & set .forward to all readable :
Examples of .forward :
(forward to tom@abc.com and peter@phy.ucb.edu)
tom@abc.com, peter@phy.ucb.edu
(forward to ann@xyz.com & keep a local copy)
\my-login-name, ann@xyz.com
Set the correct permissions :
> chmod a+x ~
> chmod a+r .forward
Automatically reply the incoming emails, tell them I am on my vacation :
Type "vacation" on the command line. Then, this program will let you type in messages that will be automatically sent to all senders. The messages are saved in a file .vacation.msg and you can edit it afterward. Also a .forward file is created and the vacation program activates.
If you want to deactivate the vacation program, just delete the .forward file.
Use "rlogin" or "telnet" to remote login other UNIX machines. For example :
(remote login axp1 with the same account)
sun1:/home/stf/peter > rlogin axp1
axp1:/home/stf/peter >
(remote login axp1 with another user account)
sun1:/home/stf/peter > telnet axp1
login: john
password: xxxxxxxx
axp1:/home/stf/john >
Use "rsh" to remote execute a program on other UNIX machines. For example :
(remote execute a program on axp1)
sun1:/home/stf/peter > rsh axp1 my-program
sun1:/home/stf/peter >
If you remote login another workstation and run an window application on the remote machine, then you must re-direct the display to the local console. Otherwise, you will not see the application display.
For example, you are on axp1. Remote login sun2 and run netscape on sun2 :
(add X-window permission that allow sun2 display onto axp1)
axp1:/home/stf/peter > xhost +sun2
(remote login sun2)
axp1:/home/stf/peter > rlogin sun2
(re-direct sun2 display to axp1 console)
sun2:/home/stf/peter > setenv DISPLAY axp1:0.0
(run the X-window application)
sun2:/home/stf/peter > netscape
Two ways to use the CUHK phonebook system :
If you are on SUN workstations, type "ph"
OR
On any other machines :
run "gopher"
select "Campus Information"
then, select "CUHK CSO Name Server <CSO>"
Step 1 : In home directory, make a sub-directory "wwwdocs"
> cd ~ ; mkdir wwwdocs
Step 2 : In wwwdocs sub-directory, create your 1st WWW page "index.html"
> cd wwwdocs ; pico index.html
Step 3 : Place all images, HTML files under ~/wwwdocs
Step 4 : Make all files & directories to all readable
> chmod -R a+r ~/wwwdocs
Step 5 : Email to Jason Chan to let him know your 1st WWW page is ready.
For more informations about how to write a HTML file :
For quick reference of HTML :
Step 1 : Make a sub-directory for your secure files
> cd ~/wwwdocs ; mkdir confidential
Step 2 : Create a file .htaccess in that sub-directory
> cd confidential ; pico .htaccess
|
AuthUserFile /home/stf/peter/wwwdocs/confidential/.htpasswd AuthGroupFile /dev/null AuthName ByPassword AuthType Basic <Limit GET> require user peter mary </Limit> |
Step 3 : Create password file in the same directory
("-c" means create a new file .htpasswd, also enter passwod for peter)
> htpasswd -c .htpasswd peter
(Enter password for mary)
> htpasswd .htpasswd mary
Step 4 : Change the files/directory to all readable
> chmod a+r *
Then, all files under ~/wwwdocs/confidential will ask for login name & password.
Only staff and tutors can book the computer facilities. Students can through their supervisors to book. Please goto the intranet site for booking affairs - http://www.phy.cuhk.edu.hk/intranet/
Current Computer Facilities that can be booked :
1. Rm326, Computational Physics Lab (PC Section) w/ 32 sets PCs -- Eng/Trad.Chin/Simp.Chin. Window 98
2. Rm328, Computational Physics Lab (UNIX Section) w/ 15 sets workstations -- UNIX
3. Notebook Computers, (w/ Multimedia Functions)
4. LCD Projectors (SVGA true color)
5. Portable Overhead Projectors (8000 lumens)
6. Digital Cameras
7. AV Equipments
You can now block all the unwanted incoming emails by your own defined word phrases by creating a file at your home directory called ".block_mail" and putting any phrases (e.g. email addresses, machine hostname, subject title, sender's names etc..) one per line into it.
The email server will scan all your incoming emails' HEADER LINES, which included Subject, From, To, Cc, Date, Receive-Path and other header information, and block mails which matched either one of .block_mail lines. (It will not check the email contents)
And there is a log message of blocked email appended to file .block_log at your home directory.
Below is the sample file of .block_mail :
==
GET OUT OF DEBT
Lucky Draw
canvasrepros@hotmail.com
drrose@pulford.ru
financebuy77
orac01.hae.de
jose_luis_argent@lycos.com.ar
mailgen@sglc.com.sg
==