Friday, November 02, 2007

emacs character set

For some reason, I get a non standard character set when I use emacs in the lab.

It is only the X version, and it crashes when I try to look at the messages buffer.

Wednesday, October 17, 2007

File Recovery

I ended up using 2 file recovery tools, magicrescue and foremost. Basically they grep through the disk blocks looking for specific patterns. This creates a huge amount of data to look through, but it seems like I was lucky and most (if not all) of the data was recovered. I tried using the sleuthkit some, and it seemed neat, but I didn't see how to apply the information it provided.

Saturday, October 13, 2007

Starting out with Java by Gaddis

I had high hopes for this book based on the subtitle of from control structures through objects, but so far I have been disappointed. Instead of focusing on the design/control structures of a program it has begun with equal treatment to objects and the other nuts and bolts of running programs. Superfluous topics like combined assignment operators are included, and the order of precedence charts are wrong.

Chapter 3 is better, but still has extra topics like the conditional operator and printf.

Chapter 4 is ok, I would prefer to focus on only one type of loop to start.

I didn't look at detail at the rest of the book. In some ways I think I might prefer a book that used a restricted subset of Java and was algorithm oriented. A different language like Python or Perl might also be more palpable, but is not an option at this point.

Tuesday, October 09, 2007

academic database

I did an overhaul of the academic database this weekend, it took longer than I expected, but it made the feedback files more uniform and clear.

angel and csv

I had problem with angel exporting data, poorly. For some reason it lost some of the data, I think it had to do with a strange csv formatting problem, but it was unclear. It was annoying in any event. In hindsight, perhaps next time I will not export the answers, just the results. That should have less problems.

backup problem on www

I made room on www for some of the archived files on server, because server was running out of space. I got rid of the old operating system, and unfortunately the home directories. I had forgotten that I had not moved those over yet. Salvador may have lost some files, I'm not sure, I've emailed him and he wasn't sure. Most of the data was over written, but there are actually some tools to do recovery now, so if he needs to I'll give it a shot.

Oh, and I fixed the backup problem on www. It is unclear if it was because of space problems, or a problem with the script, but I got it working now. I'm still unhappy with the backup scheme in place, but I don't have time to devote to a more comprehensive scheme.

Friday, October 05, 2007

Resizing a partition

One of the machines that has been causing problems is finally usable. There is a larger hard drive on it, so I'm going to try to set it up so there are two partitions for the os and one for booting in an attempt to make transitions from one version of the operating system to another more smooth.

First I am going to resize the partition so I can make new ones.
I am using the guide at:
http://www.howtoforge.com/linux_resizing_ext3_partitions

Resizing a partition

One of the machines that has been causing problems is finally usable. There is a larger hard drive on it, so I'm going to try to set it up so there are two partitions for the os and one for booting in an attempt to make transitions from one version of the operating system to another more smooth.

First I am going to resize the partition so I can make new ones.
I am using the guide at:
http://www.howtoforge.com/linux_resizing_ext3_partitions

Friday, September 21, 2007

Videos

So, I've been working on making screencapture/narration videos, and after a bit of effort I got it to work. I used recordmydesktop, and it does most of what I want. My main gripe with it is that th e audio is soft on it, and it is unclear how to boost it. Another problem encountered is that it saves the files as ogg/theora video files, which crash the video player if the resolution chosen is too large. The files it creates are fairly large.

I did do some transcoding, the lab machines can not handle 1024x768 resolution, so I used

vlc -I dummy out.ogg vlc:quit --sout "#transcode{vcodec=theo,scale=0.75}:duplicate{dst=std{access=file,mux=ogg,dst=\"three.ogg\"}}"

to change the size and

mencoder out.ogg -ovc lavc -oac mp3lame -o full.avi

to change the container to avi.

I know I could probably use transcode directly, but these worked well enough and was faster to find.

I tried audacity for podcasts and it seems pretty cool. I had problems getting the playback configured, but the recording went well.

Update: 9/26
some students had problems with it, so I am trying the following two encodings
mencoder loan_spreadsheet_1280x768.ogg -o loan_spreadsheet_1280x768.flv -of lavf -oac mp3lame -lameopts br=192 -af lavcresample=22050 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=2000:autoaspect:mbd=2:trell:v4mv -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames

there also is a scaling option -vf scale=640:480 that I didn't use, but the example I found did.

and
mencoder loan_spreadsheet_1280x768.ogg -ovc xvid -oac mp3lame -o out.avi -xvidencopts bitrate=687


I had wanted to include a quicktime version, but the codec isn't on this machine.

Thursday, September 13, 2007

Package synchronization

I looked at a bunch of different tools for package/config management. None of them do what I would like though (and some are complex and brittle too).

Basically I just want to keep all of the files synchronized with each other, with a few files fixed. It is tempting to want to remote mount /etc, but I worry about performance and reliability of such an approach. Plus I would need to use something like a unionfs to handle the machine specific files.

So, I've been writing a database app that checks the packages that are installed and looks for abnormalities. It isn't perfect, but it is a step in the right direction. The next stage is to check the consistency of the files. I've been developing a web interface via Catalyst for this as I go. It hasn't been great, but it seems adequate.

It is surprising to me, how many differences evolve over time.

Another thing that would be nice to have, is a catchup mode to bring a new machine up to speed. For instance I have two machines in the hawkins lab that need to be redone, and I just redid two in the redcay lab.

sql sequences

This was useful for setting up some databases

insert into machine select s.a, s.a from generate_series (101, 140) as s(a)

Wednesday, September 12, 2007

USB Automount

I found the problem with the usb automounting/mounting

When the users were authenticated via ldap, they were not getting the correct permissions. Essentially they have to be assigned the correct groups, to do this the common-auth, common-session, and gdm config files in /etc/pam.d need to be updated, and the /etc/security/group.conf file needs to be set up. It is working now, but it took several hours of searching and trial and error to get right, blech.

Sunday, September 09, 2007

mdadm sucks

really annoyed at mdadm, I've tried for over an hour to get it to deinstall remotely, but it insists that I must login to deinstall it in person. It is somewhat understandable, but I have about 60 machines and it is a real pain in the but to log into each one of them.

It wouldn't have been so bad, but it was something that was installed as part of the upgrade process, and I didn't go through all 800 odd packages that were part of the upgrade.

Thursday, September 06, 2007

Authentication

Met with Symen about the authentication system. We have a new LDAP group, actually two, and he helped me set up the ldap authentication so it found them correctly.
Notes:
- pam_ldap_filter did not seem to be used at all, only nss_passwd_base
- be careful with parenthesis, apparently the system auto adds some parentheses to the queries, so your query is really just a substring that is injected into the real query.
- http://www-unix.mcs.anl.gov/~gawor/ldap/applet/applet.html is a cool applet, although there should be some better ldap editors around.

It turns out that the user that I needed to set up the LDAP group for, is now in the first group anyways. Oh well, it still may be useful.

Friday, August 31, 2007

Redcay Lab

A couple of the machines have cd roms that do not even eject...

anyways, I installed it a couple of days ago. Then the screen was messed up. When I checked today though the x system looked ok, so I'll just go with it.

I used the following to sync it with the lab machines
dpkg --get-selections "*" > /tmp/sels
on one of the hawkins machines

then on the redcay prototype
dpkg --set-selections < /tmp/sels
apt-get -u dselect-upgrade

it seems to be working, although there is a huge amount of stuff to download and install.

Saturday, August 25, 2007

cont

machine 124 is still hosed, Kevin replaced the hard drive, so I guess it must be the motherboard

now I need to setup the kerberos/AD authentication
the files I need to change are
krb5.conf
ldap/ldap.conf
libnss-ldap.conf
pam_ldap.conf
pam.d/common-auth
pam.d/common-session

I set the skelton files up in /local/admin/support/skel so they would not need to be changed on each machine.

The packages that I need are
krb5-user
krb5-config
libpam-krb5
libkrb53
ntp

so in my script I will try to install those first, then copy over the corresponding files

differentiating after imaging

here are a list of files that need to be fixed
hostname
hosts
network/interfaces

are the files to be changed
script seems to work ok, but the machines are being slow, with very long latencies at time
I hope it is because nfs was confused by so many of the same ips

Friday, August 24, 2007

kerberos changeover

Worked on kerberos for server and unix.

It took forever to backup the home directories, the problem was that it was large and I started by doing a copy over nfs. That ended up being too slow, so eventually I switched to netcat and bunzip2 (although, it was a bad idea to use bunzip2 for netcat for the robot lab image because the rescue system only has gunzip available). Use netcat was about 3-4 times faster. It still took all night.

This morning I pruned the old directories of users who can not log in and I reset the UIDs to correspond to the new ones given by kerberos. That went ok. Then I put kerberos on unix, that was a pain in the but. The main problem was there was a clock drift, and I could not figure out why it was giving me problems for the life of me. It is better now, but it was a real pain to figure that out.

fall 07 checklist

still to do:
new machines/old machines in redcay lab
first day of class/lab
prepare my classes
finish imaging bad machines in hawkins lab - done 8/25
finish configuring imaged machines in hawkins and robot labs - hawkins done 8/25
find a way to image two remaining machines in robot lab
ntp all machines - done 8/25
setup kerberos on all machines - done 8/25
make sure skel files are in place - done 8/25
include robot lab links in skel
reconfigure www to use kerberos
java/emacs/etc reconfiguration

Thursday, August 23, 2007

wordpress

upgraded to 2.2, went very smooth, just untarred the new files and then ran the upgrade script, nice.

Wednesday, August 22, 2007

netcat

I forgot to log netcat last year ...

here is what I've actually ended up using
nc -l -p 3333 | gunzip | dd of=/dev/sda bs=4k
cat img | nc -q 1 addr 3333

anyways, it is fairly simple just a

netcat -p 2222 -l |bzip2 -d | dd of=/dev/sdb
on the receiving side, and on the sending side

bzip2 -c /dev/sda | netcat hostA 2222

(alternative syntax
nc -l 2222 | bzip2 -d > /dev/sdb
bzip2 -c /dev/sda | nc 192.168.1.1 2222
netcat -p 2222 -l |bzip2 -d | dd of=/dev/sdb bs=16M
dd if=/dev/hda bs=16065b | netcat targethost-IP 1234
netcat -l -p 1234 | dd of=/dev/hdc bs=16065b

)

of course I usually create the image file and save it
what I will probably do this time is bring csc127 down to single user mode
use it as a template, and then send its image to server to save it.
Then use server to distribute the image to the machines that need to be reimaged.
again, I was fairly disappointed that I seem to need to reimage so many, but it seems
to be necessary.

I have some simple scripts to log the packages installed to a database and track differences.
It surprises me too, that there is such a large discrepancy on the machines since they all
started identical. It is unclear to me what the source of the nondeterminism is....

waxing delays

I've been stymied the past couple of days by the waxers in preventing physical access to the 053b lab, hopefully I'll be able to get in soon to finish up

It also looks like I'm going to take over the robot lab, it should go ok

mail problems

well, the whole vlan was stuck without mail access in or out, apparently the culprit was some excessive messages by cslab-104, over a long period of time.

annoying. Called Symen to get it cleared up.

I discovered what the problem was,
it was tripwire was trying to send a mail report, but the address had been mangled, and then when I removed the package, it never took the cron job out, so it kept complaining every day.

Monday, August 20, 2007

lab upgrades

just spent several hours baby sitting the upgrades of the lab,
it didn't go as smoothly as I had hoped/expected. nscd gave me problems in terms of it
not configuring correctly and confusing dpkg, then there are several machines that are just out of it, and it looks like I will have to either reimage or reinstall, they are 105, 109, 113, 118, 119, and 121

blech, that is in addition to 106 and 124, which are currently out of commission.

Wednesday, August 15, 2007

active directory

Active directory/kerberos set up seems to be going fairly well
Plus I'm setting it up to auto create home directories, so hopefully the new classes will go
smoothly. I need to set up the skel directory for the new directories.

skel is set up in /local/admin/support/skel, there will be an extra .svn subdirectory, but I can filter that out later.

Now I need to make a script to sync the uid/gid with the new ones in active directory

I also need one to move people to an archived folder, I think I will do that one first.

I think the scripts are in place, contacted media services about including a couple of instructors in the kerberos group. After they are put in, then I will run the scripts.

Also, I spent about a half hour trying to figure out why something was not printing out any more. It turns out I had it as debugging info, and I was not passing the debugging flag in.

Tuesday, August 14, 2007

Upgrades, semester prep

Upgrading to postgresql 8.2
- did a pg_dumpall to save the old data
- it did not create a new 8.2 etc config, so I copied the 8.1
- now it is complaining about not having a locale to start under
- created a new database with initdb
- it still does not run from /etc/init.d
- it seems to run from /usr/lib/postgresql/8.2/bin/postgres -D /var/lib/postgresql/8.2
- strange
- data seems moved over, (pg_restore), but unclear if it will boot on its own now

Apache
- php is giving me fits
- it seems it was not enabled
- removed a couple of AllowOverride None, since it was complaining that they
were useless, I thought they were nice for documentation though

Subversion
- with the move to the new authentication, need to update this
- some progress, but I am having trouble with the authz parts of things

I spent hours on this, finally it seems that I was missing a line
AuthBasicProvider ldap
in my config. blech, it had been working before, and after the upgrade it stopped.
those are the sorts of things that are really frustrating

Thursday, August 09, 2007

Active Directory/LDAP

Here are some useful notes,
to get ldapsearch to work use

ldapsearch -v -w password -x -D username

in the ldap.conf file the nss_passwd field needed to be changed

Ubuntu Feisty upgrade

I've been working on upgrading the machines to feisty, with mixed results.
unix - the easiest of the bunch, no problems
www - was running fedora, and then forgot how to talk to anyone outside the subnet,
I suspect that somehow the networking config got messed up, which is weird
because I haven't touched it at all. I wanted to reinstall anyways, so it is
better now
server - not so good. I was going to save this one for last, but it started crashing
with kernel panics. I'm hoping there isn't a hardware problem. Anyways
I got half-way through the upgrade, and it started bogging down and having
lots of problems with responsiveness. I had to reboot, and it did not come
back up. After struggling with a rescue disc and trying to get it back up
I eventually succeeded. I'm not sure if it was part of the problem, but
mdadm and evms might have been part of the problem since I could not
boot to the kernels that they had messed with. (That bugs me, they should
not be messing with the kernel images without first asking).
hawkins 053b - somewhat messy. I've had to log into them individually to work on
the update, and they have had some problems. My next step is to
write some software to log their current status to a central db and
then try to do something to get them all synchronized.
I'm also working on getting them authenticated against the kerberos
system. I met with Symen and Shawn last week, and now need to get
the query part working.
office - went ok, nothing too exciting

Sunday, April 29, 2007

Spreadsheet problems

I guess I forgot to talk about this when it happened.

I import my test data from angel over into my own custom db for analysis and such.

One problem that I was running into was that I was using openoffice spreadsheet to convert the formatting of the grades. Well, it can only handle a certain number of columns, then it gives up, this was a problem because it was dropping a bunch of question responses in those columns.

The solution I used was to use a Perl module to do the parsing instead of just using split (angel only gives you limited options in writing the data out).

Thursday, March 15, 2007

updatedb

Server was crashing for a couple of days in a row. The apparent cause was all of the workstations running updatedb at the same time. This became a problem because for some reason updatedb was no longer ignoring nfs mounted systems. So, for the time being I've disabled updatedb, and server is not crashing...

Actually things did not go that smoothly though. Initially I thought there was a problem with server, so I tried upgrading it to edgy. Well the xserver packages did not play nice and the whole upgrade did not work, so I ended up with a postgresql complaining that UTF-8 was not installed and it would not run without it. Well, as far as I can tell it is installed. So I messed around with reinstalling postgresql a couple of time and tweaking config files to no avail.

Now, I'm running dpkg-reconfigure -a on server
yuck, hopefully it will finish sometime today and things will work again.
I've tried googling for the answer, but no one else seems to have encountered this problem.

...

Yuck, finally got it finished. It seems that the problem was in libc instead of locale. And ultimately the problem was that it was the wrong version, but since libc is so central to the system it fought with me about downgrading everything. It seems to be sorted out now. Yuck

Friday, February 09, 2007

problems

Yuck, the morning did not go well.

I had a test in my 121 class in the lab.
Well, I arrive and the monitor on the instructor computer is not showing anything, the projector is not working either. So, I use another machine to get started and to get the students going. Ready to start the test, and I start the firewall, and kaboom, all the networking on the machines die. Then of course firefox is confused and does not know how to handle it, so I have to help them start it using the profile manager.

The rest of the time I mess around with the X stuff, no luck. Finally I try reversing the cables on the splitter box, and that does it. Whether or not working with the X settings helped, I don't know, but it was annoying.

Then Jan called and his car had died, so I covered his db class, which was not too bad in comparison to the rest of the morning.

Wednesday, January 31, 2007

Attendance tool

Created a simple script in /usr/local/custom to log when students login. It simply connects to the academic database using the attendance user and logs their entry. Not much security on it, but it should not need much. The next step is to create a web page that shows student attendance on which days.

Sunday, January 21, 2007

New Students

Working on getting new students integrated into the ldap server.

First, figure out who has accounts and who doesn't

The plan is to use slapcat to dump the database
then merge_ldif.pl on the two files
move the old /var/lib/ldap directory to another place (this is rather yucky, but it helps create a backup in case something goes horribly wrong. Plus I don't have to worry about what is in it, I can just load in the new state.)
then slapcat to put the database back into place
edit the prototype directory to make it clean and ready
and then add_home_dir to finish the setup

TODO, integrate add_home_directory and fix_perms...

It seems ok now, we'll see what happens tomorrow.

Thursday, January 18, 2007

cslab-117 authentication problems

I installed ubuntu on the machine since it was out of commission due to hardware problems. And I'm having problems with getting pam to use the ldap....

I checked that the ldap itself is working with ldapsearch, but it just won't use it...
Doing a diff between it and another machine's /etc directory reveals no important differences...

Not too much useful in the log files...


I'm stumped for now