[23533] in Source-Commits
/svn/athena r23175 - in trunk/debathena/config: . cluster-login-config cluster-login-config/debian
daemon@ATHENA.MIT.EDU (ghudson@MIT.EDU)
Fri Sep 12 14:47:42 2008
Date: Fri, 12 Sep 2008 14:47:08 -0400 (EDT)
From: ghudson@MIT.EDU
Message-Id: <200809121847.OAA06349@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: ghudson
Date: 2008-09-12 14:47:07 -0400 (Fri, 12 Sep 2008)
New Revision: 23175
Added:
trunk/debathena/config/cluster-login-config/
trunk/debathena/config/cluster-login-config/debian/
trunk/debathena/config/cluster-login-config/debian/athena-root-password
trunk/debathena/config/cluster-login-config/debian/changelog
trunk/debathena/config/cluster-login-config/debian/compat
trunk/debathena/config/cluster-login-config/debian/control
trunk/debathena/config/cluster-login-config/debian/control.in
trunk/debathena/config/cluster-login-config/debian/copyright
trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.cron.daily
trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.install
trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.postinst
trunk/debathena/config/cluster-login-config/debian/rules
trunk/debathena/config/cluster-login-config/debian/sshd_not_to_be_run
trunk/debathena/config/cluster-login-config/debian/transform_gdm.conf-custom.debathena.debathena
trunk/debathena/config/cluster-login-config/debian/transform_gdm.conf.debathena.debathena
trunk/debathena/config/cluster-login-config/debian/ttymsg
Log:
Add a new package debathena-cluster-login-config to configure the
login and screensaver policy on cluster machines.
Added: trunk/debathena/config/cluster-login-config/debian/athena-root-password
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/athena-root-password 2008-09-12 14:26:00 UTC (rev 23174)
+++ trunk/debathena/config/cluster-login-config/debian/athena-root-password 2008-09-12 18:47:07 UTC (rev 23175)
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+# Sets the Athena root password based on a hashed value stored in AFS.
+
+pfile=/afs/athena.mit.edu/system/config/passwd/athena10/rootpw
+if [ -r $pfile ]; then
+ pw=$(cat $pfile)
+ if [ -n "$pw" ]; then
+ usermod -p "$pw" root
+ fi
+fi
Property changes on: trunk/debathena/config/cluster-login-config/debian/athena-root-password
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/debathena/config/cluster-login-config/debian/changelog
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/changelog 2008-09-12 14:26:00 UTC (rev 23174)
+++ trunk/debathena/config/cluster-login-config/debian/changelog 2008-09-12 18:47:07 UTC (rev 23175)
@@ -0,0 +1,5 @@
+debathena-cluster-login-config (1.0) unstable; urgency=low
+
+ * Initial release.
+
+ -- Greg Hudson <ghudson@mit.edu> Thu, 11 Sep 2008 15:21:46 -0400
Added: trunk/debathena/config/cluster-login-config/debian/compat
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/compat 2008-09-12 14:26:00 UTC (rev 23174)
+++ trunk/debathena/config/cluster-login-config/debian/compat 2008-09-12 18:47:07 UTC (rev 23175)
@@ -0,0 +1 @@
+4
Added: trunk/debathena/config/cluster-login-config/debian/control
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/control 2008-09-12 14:26:00 UTC (rev 23174)
+++ trunk/debathena/config/cluster-login-config/debian/control 2008-09-12 18:47:07 UTC (rev 23175)
@@ -0,0 +1,17 @@
+Source: debathena-cluster-login-config
+Section: debathena-config/net
+Priority: extra
+Maintainer: Debian-Athena Project <debathena@mit.edu>
+Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 4.2.0), config-package-dev (>= 4.5~), system-services, debathena-gdm-config
+Standards-Version: 3.7.2
+
+Package: debathena-cluster-login-config
+Architecture: all
+Depends: debathena-machtype, debathena-afs-config, debathena-gdm-config, gconf2
+Provides: ${diverted-files}
+Conflicts: ${diverted-files}
+Description: Login configuration for Athena cluster machines
+ This package sets up a login policy for Athena cluster machines by
+ disabling console logins, disabling sshd, disabling user switching,
+ setting the root password, and configuring the screensaver to allow
+ logouts afer a certain time period.
Added: trunk/debathena/config/cluster-login-config/debian/control.in
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/control.in 2008-09-12 14:26:00 UTC (rev 23174)
+++ trunk/debathena/config/cluster-login-config/debian/control.in 2008-09-12 18:47:07 UTC (rev 23175)
@@ -0,0 +1,18 @@
+Source: debathena-cluster-login-config
+Section: debathena-config/net
+Priority: extra
+Maintainer: Debian-Athena Project <debathena@mit.edu>
+Build-Depends: @cdbs@, system-services, debathena-gdm-config
+Standards-Version: 3.7.2
+
+Package: debathena-cluster-login-config
+Architecture: all
+Depends: debathena-machtype, debathena-afs-config, debathena-gdm-config, gconf2, gnome-screensaver
+Provides: ${diverted-files}
+Conflicts: ${diverted-files}
+Description: Login configuration for Athena cluster machines
+ This package sets up a login policy for Athena cluster machines by
+ disabling console logins, disabling sshd, disabling user switching,
+ disabling the halt/reboot/suspend commands in gdm and at logout,
+ setting the root password, and configuring the screensaver to allow
+ logouts afer a certain time period.
Added: trunk/debathena/config/cluster-login-config/debian/copyright
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/copyright 2008-09-12 14:26:00 UTC (rev 23174)
+++ trunk/debathena/config/cluster-login-config/debian/copyright 2008-09-12 18:47:07 UTC (rev 23175)
@@ -0,0 +1,11 @@
+Copyright 2008 by the Massachusetts Institute of Technology.
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of M.I.T. not be used in
+advertising or publicity pertaining to distribution of the software
+without specific, written prior permission. M.I.T. makes no
+representations about the suitability of this software for any
+purpose. It is provided "as is" without express or implied warranty.
Added: trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.cron.daily
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.cron.daily 2008-09-12 14:26:00 UTC (rev 23174)
+++ trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.cron.daily 2008-09-12 18:47:07 UTC (rev 23175)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+/usr/sbin/athena-root-password
Added: trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.install
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.install 2008-09-12 14:26:00 UTC (rev 23174)
+++ trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.install 2008-09-12 18:47:07 UTC (rev 23175)
@@ -0,0 +1,3 @@
+debian/athena-root-password usr/sbin
+debian/sshd_not_to_be_run etc/ssh
+debian/ttymsg etc/event.d
Added: trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.postinst
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.postinst 2008-09-12 14:26:00 UTC (rev 23174)
+++ trunk/debathena/config/cluster-login-config/debian/debathena-cluster-login-config.postinst 2008-09-12 18:47:07 UTC (rev 23175)
@@ -0,0 +1,57 @@
+#!/bin/sh
+# postinst script for debathena-cluster-login-config
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <postinst> `abort-remove'
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+#DEBHELPER#
+
+case "$1" in
+ configure)
+ # Shut down sshd.
+ if hash invoke-rc.d; then
+ invoke-rc.d ssh stop
+ else
+ /etc/init.d/ssh stop
+ fi
+
+ # Attempt to initially set the root password.
+ /usr/sbin/athena-root-password
+
+ # Set up gconf defaults.
+ defs=xml:readwrite:/etc/gconf/gconf.xml.defaults
+ gc="gconftool-2 --direct ---config-source=$defs --set"
+ $gc -t bool /desktop/gnome/lockdown/disable_user_switching true
+ $gc -t bool /apps/gnome-screensaver/logout_enabled true
+ $gc -t int /apps/gnome-screensaver/logout_delay 20
+ $gc -t string /apps/gnome-screensaver/logout_command \
+ "/usr/bin/gnome-session-save --kill --silent"
+ $gc -t bool /apps/gnome-screensaver/user_switch_enabled false
+ $gc -t bool /apps/gnome-screensaver/lock_enabled true
+ $gc -t int /apps/gnome-screensaver/lock_delay 1
+
+ exit 0
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
Added: trunk/debathena/config/cluster-login-config/debian/rules
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/rules 2008-09-12 14:26:00 UTC (rev 23174)
+++ trunk/debathena/config/cluster-login-config/debian/rules 2008-09-12 18:47:07 UTC (rev 23175)
@@ -0,0 +1,21 @@
+#!/usr/bin/make -f
+
+DEB_AUTO_UPDATE_DEBIAN_CONTROL = 1
+DEB_DIVERT_EXTENSION = .debathena
+ifneq ($(wildcard /etc/gdm/gdm.conf-custom.debathena),)
+ GDM_CONFFILE = /etc/gdm/gdm.conf-custom.debathena.debathena
+else
+ GDM_CONFFILE = /etc/gdm/gdm.conf.debathena.debathena
+endif
+DEB_TRANSFORM_FILES_debathena-cluster-login-config += \
+ ${GDM_CONFFILE}
+
+DEB_REMOVE_FILES_debathena-cluster-login-config += \
+ /etc/event.d/tty1 \
+ /etc/event.d/tty2 \
+ /etc/event.d/tty3 \
+ /etc/event.d/tty4 \
+ /etc/event.d/tty5 \
+ /etc/event.d/tty6
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/config-package.mk
Property changes on: trunk/debathena/config/cluster-login-config/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/debathena/config/cluster-login-config/debian/sshd_not_to_be_run
===================================================================
Added: trunk/debathena/config/cluster-login-config/debian/transform_gdm.conf-custom.debathena.debathena
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/transform_gdm.conf-custom.debathena.debathena 2008-09-12 14:26:00 UTC (rev 23174)
+++ trunk/debathena/config/cluster-login-config/debian/transform_gdm.conf-custom.debathena.debathena 2008-09-12 18:47:07 UTC (rev 23175)
@@ -0,0 +1,4 @@
+#!/bin/sed -f
+/^\[daemon\]/a\
+SystemCommandsInMenu=\
+AllowLogoutActions=
Property changes on: trunk/debathena/config/cluster-login-config/debian/transform_gdm.conf-custom.debathena.debathena
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/debathena/config/cluster-login-config/debian/transform_gdm.conf.debathena.debathena
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/transform_gdm.conf.debathena.debathena 2008-09-12 14:26:00 UTC (rev 23174)
+++ trunk/debathena/config/cluster-login-config/debian/transform_gdm.conf.debathena.debathena 2008-09-12 18:47:07 UTC (rev 23175)
@@ -0,0 +1,3 @@
+#!/bin/sed -f
+s/^SystemCommandsInMenu=.*/SystemCommandsInMenu=/
+s/^AllowLogoutActions=.*/AllowLogoutActions=/
Property changes on: trunk/debathena/config/cluster-login-config/debian/transform_gdm.conf.debathena.debathena
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/debathena/config/cluster-login-config/debian/ttymsg
===================================================================
--- trunk/debathena/config/cluster-login-config/debian/ttymsg 2008-09-12 14:26:00 UTC (rev 23174)
+++ trunk/debathena/config/cluster-login-config/debian/ttymsg 2008-09-12 18:47:07 UTC (rev 23175)
@@ -0,0 +1,17 @@
+# ttymsg
+#
+# This service displays a message on the first six ttys.
+
+start on stopped rc2
+start on stopped rc3
+start on stopped rc4
+start on stopped rc5
+
+stop on runlevel 0
+stop on runlevel 1
+stop on runlevel 6
+
+script
+m="Press ctrl-alt-F7 to log in"
+for n in 1 2 3 4 5 6; do echo "$m" > /dev/tty$n; done
+end script