Skip to content

Month: July 2006

Configure astro network client

OUT OF DATE as of 2008-11-01.

OUT OF DATE as of 2008-11-01.

Steps to configure an astronomy department linux client computer.

  1. Install Redhat Enterprise Linux AS 4
  2. Install redhat keys from:
    http://rhn.carleton.edu/pub/RedHat/keys.html
  3. Add line to /etc/hosts
    137.22.6.54 algol.physics.carleton.edu algol
  4. Add to /etc/fstab:
    algol:/home /home nfs defaults 1 1
    algol:/etc/secret /etc/secret nfs defaults 1 1
  5. Add computer’s IP address to Algol’s /etc/exports file and then run:
    /usr/sbin/exportfs -a
    on Algol
  6. Install Carleton RPM for LDAP auth:
    rpm -i –force carletonldapauth-1.00-3.es40+fc2.noarch.rpm
  7. Put mntdrives and umntdrives scripts in /usr/local/bin available on /etc/secret/RPMS/mntdrive_scripts (mntdrives.tar.gz)
  8. Make collab scripts runnable:
    chmod u=rwxs,g=rxs,o=rxs /usr/bin/smbmnt
    chmod u=rwxs,g=rxs,o=rxs /usr/bin/smbumount
  9. cp /etc/secret/RPMS/cron_scripts/redhat_update.cron /etc/cron.daily
  10. /etc/cron.daily/redhat_update.cron
  11. cp /etc/secret/RPMS/cron_scripts/get_account_info.cron /etc/cron.hourly
  12. /etc/cron.hourly/get_account_info.cron
  13. Set up printer for computers in Olin 304 and 311 (see separate “printer setup” post)
  14. test

add new user MUST BE ON THUBAN:


0. For all newusers:

  • MAKE SURE YOU ARE ROOT ON THUBAN.
  • Inform newuser that they are responsible for reading the document /docs/linux/ourhints/newusers which gives some hints and rules for users.
  • Ask their supervisor what principal group they should belong to. Otherwise the script defaults to giving them a principal group with the same name as their user name. JMW thinks this is useless though he might be wrong. A good choice for Joel’s students is “pulsar”.

Steps 1 through 4 are for adding a linux account for a Carleton user with a Carleton username and password. If the person in question is not a member of the Carleton Community, skip straight to step 5.

  1. At the sh prompt, type “useradd -g pulsar <username>”.
  2. Then type “edquota <username>which brings up a vi session, and set the block soft quota to 200000, and the block hard quota to 240000. To do this type ‘i’ (w/o quotes) to insert text into the file, change the values and hit <escape>. Then type “:wq” (w/o quotes) to save the file and exit vi. Do not change any other fields or numbers. Just replace the 0 under “soft quota” with 200000 and the 0 under “hard quota” with 240000.
  3. Then edit /etc/passwd, find <username>’s entry, and enter their full name in the 5th field and change their login shell to ‘/bin/tcsh’.
  4. Go to astro-server list, login, and add <username>@carleton.edu to the list. Then you are done. The user will need to wait 15 minutes for the changes to propagate to the other Astro machines. They should then be able to log in. If user has no carleton account, follow these directions instead of the above:

  5. Determine the alien user’s uid. By convention, Carleton reserves all uid/gid values of 15000+ for Carleton ldap authenticated user accts. So we must choose an unallocated uid for the new user with a value between 500 and 14999. Look at /etc/passwd to find the next available uid larger than 500 and less than 14999. Then open a shell as root on thuban and issue these commands:
  6. adduser <username> -g pulsar -u <uid>”, replacing <username> with the user’s id and <uid> with the uid you’ve just chosen.
  7. passwd <username>” to set the password to a password of your choice.
  8. Then edit /etc/passwd, find <username>’s entry, and enter their full name in the 5th field and change their login shell to ‘/bin/tcsh’.
  9. Then type “edquota <username>which brings up a vi session, and set the block soft quota to 200000, and the block hard quota to 240000. To do this type ‘i’ (w/o quotes) to insert text into the file, change the values and hit <escape>. Then type “:wq” (w/o quotes) to save the file and exit vi. Do not change any other fields or numbers. Just replace the 0 under “soft quota” with 200000 and the 0 under “hard quota” with 240000.
  10. Go to astro-server list, login, and add alien’s email address to the list.
  11. You will then need to wait 15 minutes for the changes to propagate throughout the system. Notify alien of new account and whatever password you set it to. The first thing s/he should do when logging in is change his password(using the passwd command ON THUBAN) to something s/he will remember.

Useful 1-line commands: repquota,lsraid,rpcinfo,du,clear

One-liners

  • repquota /home
    report on quota usage in /home directory
  • lsraid -A -a /dev/md0
    report on state of RAID array
  • rpcinfo -p
    To see what’s running
  • du -h max-depth=1 /home
    List space occupied on home
  • clear && tail /etc/secret/logs/*.log -n 3
    Show the last action taken on astro network machines

 

 

printer setup and commands

OUT OF DATE as of 2008-11-01.

bring up app>>sys settings>>printing and enter sys password

———————————————————————–

for hp color in 304 astro lab:

Queue name: Olin304-CLJ4550

Queue type tab:

Queue type: Networked UNIX LPD
server: Olin304-CLJ4550.physics.carleton.edu
queue: Olin304-CLJ4550–(perhaps must be exactly this since it has been set up thus on another.)
Generic: Printer driver: Postscript printer

————————————————————————-

for hp color in workroom 311

Queue name: AstroPrinterOlin311

Queue type tab:

Queue type: Networked Jetdirect
server: Olin311-x6350.physics.carleton.edu
port:9100

Generic: Printer driver: Postscript printer

————————————————-

some useful queries of printer queues:

lpq [-P]

lpstat -v
lpstat -a

———————–

To print to a queue: lpr -P filename

To pretty-print an ascii file to a queue: a2ps -o filename

pgplot plotting routine for fortran and c

pgplot is in /usr/share/astro/pgplot/

for it to work correctly, one needs to set two environment variables, which can be done by putting the following two lines into the user’s .cshrc file:

setenv LD_LIBRARY_PATH /usr/share/astro/pgplot:/usr/local/lib
setenv PGPLOT_FONT /usr/share/astro/pgplot/grfont.dat

to compile and link a program with pgplot calls:

pglink.f77 programname for fortran 77 (do NOT include the “.f” extension in programname)
[formerly called linf77pgx]

pglink.f95 programname for fortran 95 (do NOT include the “.f90” extension in programname)
[currently the above invokes the g95 compiler/linker but expects that the source pgm has .f90 ext.]

pglink.c programname for c (do NOT include the “.c” extension in programname)
[formerly called lincpg, I think]

pglink.c.psr programname for c (do NOT include the “.c” extension in programname)
[formerly called lincpgpsr, I think] –links in starlink and psrcat routines in addition to pgplot. If this is ever used, paths in script will have to be updated. However George Hobbs said psrcat no longer needs separate starlink routines.

“locate ” to find a library etc

the way to find if a library or other file (?) is on sys is to say locate libpng

locate looks at a database so it is safer to first say updatedb which may take a while.
(note this is ~similar to “which “, which looks in your path for an executable.)

vnc client installation onto Mirzam (and later Deneb) via rpg

OUT OF DATE as of 2008-11-01.

JMW installed vnc client onto mirzam into /usr/bin.

Download it from http://rpmfind.net/linux/RPM/redhat/9/i386/vnc-3.3.3r2-47.i386.html

I did it as root and it placed a package on desktop. clicking it a few times installed it into /usr/bin

Drew added it to Deneb at a later time.