Subject: using "shutdown" as a shell
To: None <netbsd-help@netbsd.org>
From: Lubos Vrbka <shnek@chemi.muni.cz>
List: netbsd-help
Date: 09/11/2003 23:56:32
hi guys,

we have a computer laboratory for students. all computers (i386) are 
dualboot with win2k and netbsd 1.6.1. we wanted to have one "shutdown 
user" (login shutdown, no password) for the purpose of restarting 
computer back to windows (used 80-90% of time). why?

1) you have to be group operator to use shutdown (hope it's not a 
mistake). to have all users group operator is not a good idea

2) people who have accounts on win2k usually don't have account on 
netbsd. if someone working in netbsd forgets to reboot (if he has 
privileges to do it) the machine, there remains the login prompt. 
regular m$ user sees something unfamiliar and then does the usual 
windoze-user stuff:
	"aaargf, this weird text mode, windows must have frozen, let's restart 
it!" but ctrl-alt-del at login prompt doesn't work, so the user resets 
the computer... and it's not good...

in the past, we had such a special user in the netbsd and it worked. we 
had binary called "shutup" (sgid operator, a simple program executing 
shutdown -r now), used as a shell for user shutdown. however, after the 
reinstallation of the system from 1.5a to 1.6.1 it stopped working 
(problems with libraries). i recompiled the source, restored the 
settings, but:

after execution from the command prompt, it restarts the system - no problem

after invocation as a shell does 5 seconds nothing and then returns back 
to the login prompt.

i added it to /etc/shells, but it still behaves the same. does anybody 
know where could be the problem?

thanks for your help. regards,
lubos

-- 
#####################################################
Mgr. Lubos Vrbka

Center for Complex Molecular Systems and Biomolecules
J. Heyrovsky Institute of Physical Chemistry
Academy of Sciences of the Czech Republic
Prague, Czech Republic

shnek@chemi.muni.cz
#####################################################