[Lancaster] Fwd: Re: installing the web server

Martyn Welch welchm at comp.lancs.ac.uk
Fri Jun 11 07:37:50 BST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



- ----------  Forwarded Message  ----------

Subject: Re: installing the web server
Date: Thursday 10 June 2004 19:22
From: "andy baxter" <skullcap23 at hotmail.com>
To: welchm at comp.lancs.ac.uk

could you copy this to the list? - my smtp sending is still down.

Went in today to set up the guest-config thing we talked about. I.e. there
is an account called guest-config which is an image of how all the guest
accounts should be set up when someone first logs in. I put a script in
/etc/X11/xinit.d (called from the Xsession script) which checks to see if
it's a guest account, and if it is, deletes all the contents of the home
directory, then copies it from /home/guest-config.

/home/guest-config is set up with a Desktop folder which becomes the guest
account's Desktop. This has a link in it to a file
/home/guest-config/help.txt, which we can put any user help info into. The
Desktop dir is completely deleted and recreated whenever someone logs in, so
the Desktop will always start off looking how we've set it up, and any files
saved there will be deleted at the start of the next session.

The Documents folder is a symlink to /home/guest-shared/Documents, which is
set chmod g+s and chown guest-config:guest, so that any new files created
there are owned by user guest and can be read by all the guest accounts.
I.e. if someone saves a file in Documents, it will stay between sessions, in
case someone wants to carry on with something they were doing the next day.

I also put a script in /etc/cron.hourly which removes any files in
/home/guest-shared/Documents which are more than a month old, and sets the
permissions on all the files in it to g+rw. This is a bit of a dirty hack -
really it should just do the first of these and be in cron.daily, but the
problem is the default file creation mask is set to 133, which means files
written by guest1 are not group-writeable, and can't be written to by
guest2. I.e. if someone saved some work and logged in the next day on
another machine, they would have to copy their file to a new name to carry
on working on it. If anyone knows how to set the default umask for only the
guest users to 113, this would be a help.

I would still like to see if there is a simple way of having just one guest
account which maps into one of several terminal-specific accounts after
someone has logged in, but I'm not sure how to do this. I've tested the
thing i posted before about using xrdb to get the terminal's hostname, which
returns something like host-192.168.3.51.folly.co.uk, so in principle we
could have a few guest accounts with names like guest-3-51 and guest-3-52,
but I'm not sure how to switch to the new account in the Xsession script, or
if this is a good idea anyhow (bearing in mind ken's comments about
simplicity). It would be nice though if there could just be a single poster
on the wall saying 'to use these computers, log in as guest, password guest,
then see the help file on the desktop for more information"

see you,

andy



- -- 
Martyn Welch (welchm at comp.lancs.ac.uk)

PGP Key : http://ubicomp.lancs.ac.uk/~martyn/pgpkey.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFAyVNnQPzYXciChNcRAp9xAKCJQhGH10z/TbPqxjaD6/3oMb8TnwCgtCZs
8iHEp8dShHfYi5IKMdUNhG4=
=fsGL
-----END PGP SIGNATURE-----




More information about the Lancaster mailing list