[olug] Unix Tip: KEEP THAT USER OUT!
Christopher Cashell
topher at zyp.org
Thu Dec 12 20:46:47 UTC 2002
At Thu, 12 Dec 02, Unidentified Flying Banana Unix Guru Universe, said:
> KEEP THAT USER OUT!
>
> Ever get into one of
> those pesky admin wars
I'm going to hope this is a joke, as anyone who actually does something
like this should be drawn, quartered, hung, shot, burned, and fired.
> or need to keep the
> developers off of your
> system for a few minutes
> without taking the system
> to single user mode?
>
> This nasty little script
> will do the trick.
[Snip: Bad way to stop users from accessing a system.]
This is a really poor way to temporarily keep non-root users off of a
system. A much better way is to simply (as root) do (as one line):
echo "*** The System is temporarily unavailable.
Please try back later. ***" >> /etc/nologin
This will work on Solaris, nearly all Linux systems (both the standard
Linux login and PAM support it), and at least NetBSD of the BSD's
supports it, too. The contents of /etc/nologin will be displayed to any
non-root users who try to login, and their login will be refused.
Removing /etc/nologin will allow normal logins from non-root users
again.
> This can make you the life
> of the party (At work)
>
> Don Cooley
> Unix Systems/Security Admin
> Wellogix Inc.
> dcooley at wellogix.com
--
| Christopher
+------------------------------------------------+
| A: No. |
| Q: Should I include quotations after my reply? |
+------------------------------------------------+
More information about the OLUG
mailing list