📄 node89.html
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<!--Converted with LaTeX2HTML 96.1-h (September 30, 1996) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds -->
<html>
<head>
<title>Disabling a user temporarily</title>
<meta NAME="description" CONTENT="Disabling a user temporarily">
<meta NAME="keywords" CONTENT="sag">
<meta NAME="resource-type" CONTENT="document">
<meta NAME="distribution" CONTENT="global">
<link REL="STYLESHEET" HREF="sag.css">
</head>
<body LANG="EN">
<a NAME="tex2html1413" HREF="node90.html"><img WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" ALT="next" SRC="./next_motif.gif"></a> <a NAME="tex2html1411" HREF="node80.html"><img WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" ALT="up" SRC="./up_motif.gif"></a> <a NAME="tex2html1407" HREF="node88.html"><img WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" ALT="previous" SRC="./previous_motif.gif"></a> <a NAME="tex2html1415" HREF="node1.html"><img WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" ALT="contents" SRC="./contents_motif.gif"></a> <a NAME="tex2html1416" HREF="node108.html"><img WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" ALT="index" SRC="./index_motif.gif"></a> <br>
<b> Next:</b> <a NAME="tex2html1414" HREF="node90.html">Backups</a>
<b>Up:</b> <a NAME="tex2html1412" HREF="node80.html">Managing user accounts</a>
<b> Previous:</b> <a NAME="tex2html1408" HREF="node88.html">Removing a user</a>
<br> <p>
<h1><a NAME="SECTION00950000000000000000">临时禁止一个用户</a></h1>
<p>
有时需要临时禁止一个用户,而不删除它。例如用户没有付费,或系统管理员怀疑黑客得到了某个帐户的口令。
<p>
禁止一个用户的最好方法是将它的shell变到一个特定的只打印出一条信息的程序,
用这种方法,任何想登录此帐户的人将无法登录,并得知原因。
该信息可以告诉用户与系统管理员联系,以处理任何问题。
<p>
也可以改变用户名或口令,但这样用户不知道怎么回事。
Confused users mean more work.
<a NAME="tex2html37" HREF="footnode.html#2470"><img ALIGN="BOTTOM" ALT="gif" SRC="./foot_motif.gif" WIDTH="15" HEIGHT="15"></a>
<p>
产生上述特定程序的一个简单方法是写"tail scripts":
<blockquote> <pre>#!/usr/bin/tail +2
This account has been closed due to a security breach.
Please call 555-1234 and wait for the men in black to arrive.</pre></blockquote>
前2个字符("<code>#!</code>")告诉核心本行的其他部分是解释本文件要运行的命令。
这样<tt>tail</tt><a NAME="2552"> </a>命令将输出处理第一行外的所有东西到标准输出。
<p>
如果怀疑<tt>billg</tt>是个安全缺口,系统管理员可以这样做:
<blockquote> <tt>
<code>#</code> <i>chsh -s /usr/local/lib/no-login/security billg</i> <br>
<code>#</code> <i>su - tester</i> <br>
<code>This account has been closed due to a security breach.</code> <br>
<code>Please call 555-1234 and wait for the men in black to arrive.</code> <br>
<code>#</code>
</tt></blockquote>
<tt>su</tt><a NAME="2554"> </a>的目的是此时改变是否工作。
<p>
Tail scripts应该放在一个分离的目录中,这样它们的名字不会干扰普通用户的命令。
<p>
<br> <hr>
<p><address>
<i>Lars Wirzenius <br>
Sun Jun 29 13:31:22 EEST 1997</i>
</address>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -