> From: "Thomas A. Gardiner" <gardiner_at_pas.rochester.edu>
> As for shutting down there are a couple of possibilities which have been
> suggested in the past. One is
...
Here's two more suggestions:
1) If you're on RH6, then you'll (probably) have a package installed called
`usermode'. This provides a program /usr/bin/shutdown (among others). It pops
up a dialogue, prompts for the *user's* password, and shuts the machine down!
So add a menu item somewhere (see AddToMenu in man fvwm2):
+ "Shut down" Exec /usr/bin/shutdown -h now
and perhaps also
+ "Reboot" Exec /usr/bin/shutdown -r now
(I'm going to add this feature to my AnotherLevelUp package soon.)
2) Add a user called stop -- then you can shutdown at the login prompt. This
may not be wise in a `hostile' environment -e.g. if your machine has a
permanent internet connection. It definitely works if you have text logins, I
haven't tried it with xdm/gdm, but it ought to work.
In /etc/passwd, add the line (as root, carefully)
stop:XX:0:0::/sbin:/sbin/shutdown -h now
assuming that shutdown lives in /sbin. Note that this is the real shutdown
command, rather than the gui wrapper for it mentioned above, which is (may be)
in /usr/bin. This new user is an alias for root, so make sure it appears AFTER
the entry for root in the passwd file (otherwise all/most references to the
user root will appear as stop!).
Now set the password for stop, running (still as root):
passwd stop
and follow instructions. You may find an empty password is permitted by passwd
(after it objects about it being `WAY too short') but does not work when you
try to use it, depending on the `pam' set up for logins. However, you should
be able to get a nice short password (single character?) to work, even though
passwd will object when you set it.
Regards, John
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Thu Apr 06 2000 - 08:12:14 BST