| From | Sent On | Attachments |
|---|---|---|
| Darren Wiebe | May 11, 1999 9:50 am | |
| G. Adam Stanislav | May 11, 1999 1:24 pm | |
| unkn...@riverstyx.net | May 11, 1999 1:51 pm | |
| Dan Langille | May 11, 1999 2:01 pm | |
| unkn...@riverstyx.net | May 11, 1999 3:03 pm | |
| G. Adam Stanislav | May 11, 1999 3:46 pm | |
| Eric Hodel | May 11, 1999 7:13 pm | |
| Rick Hamell | May 11, 1999 7:17 pm | |
| unkn...@riverstyx.net | May 12, 1999 8:23 pm | |
| unkn...@riverstyx.net | May 12, 1999 8:29 pm | |
| Sue Blake | May 12, 1999 8:42 pm | |
| unkn...@riverstyx.net | May 12, 1999 9:21 pm | |
| G. Adam Stanislav | May 13, 1999 8:11 am | |
| unkn...@riverstyx.net | May 13, 1999 11:49 am | |
| K. Marsh | May 13, 1999 12:06 pm | |
| unkn...@riverstyx.net | May 13, 1999 1:27 pm | |
| The Classiest Man Alive | May 13, 1999 2:00 pm | |
| Sue Blake | May 13, 1999 2:43 pm | |
| unkn...@riverstyx.net | May 13, 1999 3:32 pm | |
| G. Adam Stanislav | May 13, 1999 4:45 pm | |
| rick hamell | May 13, 1999 7:19 pm | |
| Eric Hodel | May 13, 1999 8:02 pm | |
| Alex Kapranoff | May 14, 1999 12:34 am | |
| G. Adam Stanislav | May 14, 1999 6:41 am | |
| G. Adam Stanislav | May 14, 1999 4:46 pm | |
| Sue Blake | May 14, 1999 5:30 pm | |
| Alex Kapranoff | May 15, 1999 1:21 am | |
| G. Adam Stanislav | May 15, 1999 9:04 am | |
| G. Adam Stanislav | May 15, 1999 9:09 am | |
| Tim Vanderhoek | May 15, 1999 2:18 pm | |
| Alex Kapranoff | May 16, 1999 12:42 am | |
| G. Adam Stanislav | May 16, 1999 7:20 am | |
| Adam Szilveszter | May 16, 1999 7:50 am | |
| G. Adam Stanislav | May 16, 1999 11:45 am | |
| Adam Szilveszter | May 16, 1999 1:00 pm | |
| G. Adam Stanislav | May 16, 1999 3:03 pm | |
| Adam Szilveszter | May 16, 1999 11:19 pm | |
| Takeshi Otsuki | May 16, 1999 11:19 pm | |
| Jukka Simila | May 17, 1999 1:25 am | |
| Jukka Simila | May 17, 1999 9:28 am | |
| Adam Szilveszter | May 17, 1999 9:56 am | |
| unkn...@riverstyx.net | May 17, 1999 1:07 pm | |
| David Wolfskill | May 17, 1999 3:35 pm | |
| G. Adam Stanislav | May 17, 1999 3:43 pm | |
| Bill Swingle | May 17, 1999 4:35 pm | |
| unkn...@riverstyx.net | May 17, 1999 4:39 pm | |
| Sue Blake | May 17, 1999 4:40 pm | |
| unkn...@riverstyx.net | May 17, 1999 4:46 pm | |
| Crist J. Clark | May 17, 1999 6:52 pm | |
| Laurence Berland | May 17, 1999 7:42 pm | |
| Alex Kapranoff | May 17, 1999 9:15 pm |
| Subject: | Re: Newbie tip | |
|---|---|---|
| From: | Crist J. Clark (cj...@cc942873-a.ewndsr1.nj.home.com) | |
| Date: | May 17, 1999 6:52:23 pm | |
| List: | org.freebsd.freebsd-newbies | |
Jukka Simila wrote,
But: If you have a computer that can't be power-on for 24h / day, say, a computer used mainly for text-editing (that old 486 :), wouldn't it be nicer to give users a possibility to shut it down with their own password, rather than delivering root's password to everyone, or recommending microsoft-style shutdown "just switch the power off, it's all right then" :)
Of course, better example than "sudo reboot" would have been "sudo halt" which would do the obvious.
On a computer at work that people need to be able to bring up and down, I did the following old trick,
1) I created a user called 'shutdown' 2) Made the user a member of group 'operator' (5). 3) Gave shutdown a startup shell something like, /usr/local/libexec/conshtdwn 4) Put something like the following in that file,
#!/bin/sh
if [ -z $REMOTEHOST ] && [ "x$HOST" = "x`hostname`" ]; then
/sbin/shutdown -h now
else
echo "The computer may only be shutdown at the terminal." echo "" echo "This account is not available for login." exit 1
fi
# NOT REACHED exit 2
5) Give the user, shutdown, a null password.
This way, anyone, even someone without an account, can shutdown the computer gracefully at the terminal. This is much better than the other alternative of having them push reset or cycle the power on the running OS.
I must admit I can't remember for sure how I did the check to make sure the login is not from a remote machine (for obvious reasons an anonymous shutdown from remote locations is a Bad Thing). The way I have done it here is for illustrative purposes, I do not think it is sure-fire or secure.
-- Crist J. Clark cjcl...@home.com
To Unsubscribe: send mail to majo...@FreeBSD.org with "unsubscribe freebsd-newbies" in the body of the message





