home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!ub!acsu.buffalo.edu!miskines
- From: miskines@acsu.buffalo.edu (Robert J. Miskines)
- Newsgroups: comp.sys.sgi
- Subject: Re: shutdown by user
- Message-ID: <BtD6DI.n2p@acsu.buffalo.edu>
- Date: 22 Aug 92 02:46:29 GMT
- References: <o6a8rsk@zuni.esd.sgi.com> <on7kv68@rhyolite.wpd.sgi.com> <23754@oasys.dt.navy.mil>
- Sender: nntp@acsu.buffalo.edu
- Organization: UB
- Lines: 60
- Nntp-Posting-Host: lictor.acsu.buffalo.edu
-
- In article <23754@oasys.dt.navy.mil> hendrix@oasys.dt.navy.mil (Dane Hendrix) writes:
- >
- >I agree with the need for an /etc/ftpusers entry. The reason for having
- >a shutdown account was so that a less closely held password could
- >enable users to shutdown the system. If there is no entry in the
- >/etc/ftpusers file for the shutdown account, the damage possible due
- >to disclosure of the shutdown password is nearly(?) as great as that
- >due to disclosure of the root password.
- >
-
- Why not just make a link to init called "shutdown2" or
- something suid to root, and let people run that... You could even
- make it so that a specific group could shut it down. Eliminating the
- possible guests that may use that machine.
-
- That way, noone has root access, and the machine can be shut
- down without fail... The other thing that I have noticed on Irix is
- that in the /etc directory there is a file that looks like this:
-
- -rwSr-xr-x 1 root sys 8240 Jul 11 00:58 /etc/suid_exec
-
- Anyone know anything about this?
-
- There are a variety of ways to do things the secure way...
- For instance, writing one's own 'C' program, something like this:
-
- -=-=-=- cut here prog.c -=-=-=
- #include <stdio.h>
- #include <sys/types.h>
- #include <signal.h>
-
- main()
- {
- kill(1,1);
- exit(0);
- }
- -=-=-=-= cut here prog.c -=-=-=
-
- Seeing as init is always pid 1, and signal 1 will shut down
- the system, that's all you need... Just remember to compile it with:
-
- cc -D_BSD_SIGNALS -o shutdown2 prog.c
-
- The you'd:
-
- chown root.[X] shutdown2
- chmod 475[X] shutdown2
-
- [X]= use your own discretion.
-
- At least that's the way i have it set up here... And you can
- even add it into your toolchest! Now how's that for convienience?
-
- Don't just create a shell script and suid it to root... That
- would be bad!
-
-
- If you have any questions regarding the following, or you lack
- a development system to compile that with, you can send mail to Karl
- Vesterling at "kjv@exucom.com", and ask him to mail the binary to you.
-