Boris Kantwerk schrieb am Thu, 2 Nov 2000 um 00:28:
... or (looks nicer) create a script /bin/nologin with:
#!/bin/sh
echo Sorry you've no shell here :-(
echo Contact root@x.z.y
sleep 5
... and set /bin/nologin in /etc/passwd
Don't do this. This causes a spawning of a shell, and that can be
exploited. If you really need feedback, use
----- nologin.c -----
#include
#include
void main() {
printf("Sorry you've no shell here :-(\nContact root@x.z.y");
usleep(5000);
}
---------------------
(untested!!)
Even this program spawns a program "waiting" for nothing; it might be a
little obscure, but it could be a possible DoS hole.
For the same reason, do not use /bin/false and /bin/true in SuSE <
6.something - in older versions, these files were shell scripts.
Bye,
Bastian
--
Bastian Friedrich bastian@bastian-friedrich.de
Adress & Fon available on my HP http://www.bastian-friedrich.de/
\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
\ Fachbegriffe der Informatik - 9: "GUI"
\ Ein Hintergrundbild und 12 Xterms
\ Kristian Köhntopp