📄 node83.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>/etc/passwd and other informative files</title>
<meta NAME="description" CONTENT="/etc/passwd and other informative files">
<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="tex2html1345" HREF="node84.html"><img WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" ALT="next" SRC="./next_motif.gif"></a> <a NAME="tex2html1343" HREF="node82.html"><img WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" ALT="up" SRC="./up_motif.gif"></a> <a NAME="tex2html1337" HREF="node82.html"><img WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" ALT="previous" SRC="./previous_motif.gif"></a> <a NAME="tex2html1347" HREF="node1.html"><img WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" ALT="contents" SRC="./contents_motif.gif"></a> <a NAME="tex2html1348" HREF="node108.html"><img WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" ALT="index" SRC="./index_motif.gif"></a> <br>
<b> Next:</b> <a NAME="tex2html1346" HREF="node84.html">Picking numeric user and </a>
<b>Up:</b> <a NAME="tex2html1344" HREF="node82.html">Creating a user</a>
<b> Previous:</b> <a NAME="tex2html1338" HREF="node82.html">Creating a user</a>
<br> <p>
<a NAME="2480"> </a><h2><a NAME="SECTION00921000000000000000"><tt>/etc/passwd</tt>和其他信息文件</a></h2>
<p>
Unix系统的基本用户数据库是文本文件,<tt>/etc/passwd</tt><a NAME="2482"> </a>(叫<b>口令文件</b>),
它列出所有有效用户名及其相关信息。文件的每个用户一行,分为用:分隔的7个域:
<ol>
<li> 用户名
<li> 加密格式的口令
<li> 数字的user id
<li> 数字的group id
<li> 全名或帐户的其他说明
<li> 家目录
<li> 登录shell(登录时运行的程序)
</ol>
详细的格式说明在<em>passwd</em><a NAME="2485"> </a>(5)中。
<p>
系统中的任何用户可以读口令文件,因此他们可以得到其他用户的名字。
即任何人也可以得到口令(第二个域)。口令文件加密了口令,所以利润上说应该没有问题。
但是,加密是可破解的,尤其是口令比较简单时(例如太短,或能在词典中找到的)。
因此,口令存在口令文件中并不好。
<p>
许多Linux系统有<b>影子口令shadow passwords</b>文件。
这种方法将加密的口令存在另一个文件<tt>/etc/shadow</tt><a NAME="2488"> </a>中,
而这个文件只有<tt>root</tt>能读。
<tt>/etc/passwd</tt><a NAME="2490"> </a>文件在第二个域只有一个special marker。
Any program that needs to verify a user is setuid,那么可以存取影子口令文件。
而只使用口令文件其他域的普通程序,不能得到口令。
<a NAME="tex2html34" HREF="footnode.html#2468"><img ALIGN="BOTTOM" ALT="gif" SRC="./foot_motif.gif" WIDTH="15" HEIGHT="15"></a>
<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 + -