📄 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" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/sag.css">
</HEAD>
<BODY LANG="EN" >
<A NAME="tex2html1345" HREF="node84.html" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/node84.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="next_motif.gif" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/next_motif.gif"></A> <A NAME="tex2html1343" HREF="node82.html" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/node82.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="up_motif.gif" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/up_motif.gif"></A> <A NAME="tex2html1337" HREF="node82.html" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/node82.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/previous_motif.gif"></A> <A NAME="tex2html1347" HREF="node1.html" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/contents_motif.gif"></A> <A NAME="tex2html1348" HREF="node108.html" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/node108.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="index_motif.gif" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html1346" HREF="node84.html" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/node84.html">Picking numeric user and </A>
<B>Up:</B> <A NAME="tex2html1344" HREF="node82.html" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/node82.html">Creating a user</A>
<B> Previous:</B> <A NAME="tex2html1338" HREF="node82.html" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/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" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/footnode.html#2468"><IMG ALIGN=BOTTOM ALT="gif" SRC="foot_motif.gif" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/foot_motif.gif"></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 + -