Skip to content

Category: Astro Network

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.

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

/usr/share/astro = shared astro directory

this directory is a place for astro software that needs to be shared across all hosts.

for example right now it has some scripts for compiling and linking fortran, c, pgplot, etc.

it also contains jpeg2ps, astrolib, sm, starlink, pgplot ; many of which have not yet actually been installed but only transferred to here. ie they may well have wrong paths. by the way, to add /usr/share/astro to your path (so that this directory is automatically searched for executables), either copy joel’s .cshrc to your home directory, or put into your .cshrc a line that says

set path = (. $path /usr/share/astro)

(this should replace or augment any current such statement in your .cshrc. note that there are three entries inside the parentheses: ‘.’ which means the current directory; ‘$path’ which means whatever the current value of the path is; and ‘/usr/share/astro’, which is what you want to add.)

Converting RAID to LVM-on-RAID

OUT OF DATE as of 2008-11-01.

We decided to convert the Raid1 array to LVM instead of a monolithic partition. This will make life easier.

Commands:

  1. pvcreate /dev/md0
    makes a physical volume out of the RAID array device
  2. vgcreate VolGroup01 /dev/md0
    creates a new volume group to which we can add logical volumes
  3. Use Redhat Logical Volume Management tool to create partitions on the new device
    • /docs (5 gigs)
    • /home (50 gigs)
    • /etc/secret (10 gigs)
    • /data (399 gigs)
  4. Modified /etc/exports on Algol to export the new partitions
  5. Modified /etc/fstab on the client computers to use the new partitions
  • mkdir /docs
  • mkdir /data
  • added lines to /etc/fstab:
    algol:/data /data nfs defaults 1 1
    algol:/docs /docs nfs defaults 1 1
  1. Un-tarred the backups from /bkup, which I created with the command:
    cd /bkup & tar -czvpf home.tgz /home
  2. Untar by going to desired directory and running:
    tar -xzvpf /bkup/secret.tgz
    Both of these commands put the directory INTO the desired directory. Once unpacked, it’s necessary to move the contents to the proper location.
  3. Modified /etc/cron.weekly/quotacheck.cron to be:
    #!/bin/bash
    # Update the database that keeps track of quotas
    # Created by Mark Knight (4.13.06)
    # Modified by Mark Knight (5.06.06)
    quotaoff -a
    quotacheck -agum
    quotaon -a

    exit 0

  4. Also, had to modify /etc/fstab to add quotas back on to the new mount line for /home

All in all, not that hard. The permissions are all correct, so hopefully this was just as easy & painless as I think it was.

Create a new shared directory

To create the directory “test” in /home, execute as root:

  1. mkdir /home/test
  2. chmod -vcR u=rwx,g=rwxs,o=- /home/test
    OR
    chmod -R 2770 /home/test
    (these two commands both do the same thing)
  3. groupadd testgrp
    (create a new group.)
  4. chgrp -vcR testgrp /home/test
  5. usermod -a -G testgrp knightm
    (add user knightm to the group so he has permissions. Repeat for all users in group. To check, run “groups knightm”)