[1571] in athena10
sudo's lecture_file for "You're in a chroot!"
daemon@ATHENA.MIT.EDU (Geoffrey Thomas)
Thu Mar 12 16:15:54 2009
Date: Thu, 12 Mar 2009 16:14:57 -0400 (EDT)
From: Geoffrey Thomas <geofft@MIT.EDU>
To: debathena@mit.edu
Message-ID: <alpine.DEB.2.00.0903121559430.8802@geminorum.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII
Hey,
We noticed on zephyr today that sudo has a lecture_file option that will
cause it to print a custom message the first time you run sudo. I propose
we use it to do something like
$ sudo aptitude install snes9x-x
Attention: You are on a Debathena cluster machine. Although you can use
sudo to become root, your access is restricted to a sandbox (chroot)
created when you logged in. If you install software or change
global settings, they will be reverted when you log out.
If you would like a permanent change to cluster machines, please
report a bug via the "sendbug" command.
Enter your Athena password below.
[sudo] password for geofft:
This would involve setting "Defaults lecture_file=(this warning)
lecture=once" in /etc/sudoers.
Another option would be to do this with pam_echo in /etc/pam.d/sudo and
/etc/pam.d/su. It has the advantage of also working for su, but making it
warn you only once would be harder, so we'd probably have to say something
shorter like "Warning: You are in a login sandbox. See http://... for more
information."
Another option would be for 'tellme root' to print the same warning to
cover the 'su' case, although unless we change the root password nobody
will notice...
--
Geoffrey Thomas
geofft@mit.edu