⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 node86.html

📁 linux管理操作指南!大家看看就知道!很不错的!无解压密码!
💻 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>Creating a user by hand</TITLE>
<META NAME="description" CONTENT="Creating a user by hand">
<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="tex2html1379" HREF="node87.html" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/node87.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="tex2html1377" 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="tex2html1373" HREF="node85.html" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/node85.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="tex2html1381" 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="tex2html1382" 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="tex2html1380" HREF="node87.html" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/node87.html">Changing user properties</A>
<B>Up:</B> <A NAME="tex2html1378" HREF="node82.html" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/node82.html">Creating a user</A>
<B> Previous:</B> <A NAME="tex2html1374" HREF="node85.html" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/node85.html">Initial environment: /etc/skel</A>
<BR> <P>
<H2><A NAME="SECTION00924000000000000000">手工创建用户</A></H2>
<A NAME="subsecmanualadduser">&#160;</A>
<P>
按以下步骤手工创建新用户:
	<OL>
<LI>用<tt>vipw</tt><A NAME="2508">&#160;</A>(8)编辑<tt>/etc/passwd</tt><A NAME="2506">&#160;</A>,
为新用户增加一个新行。注意语法。
<em>不要用编辑器直接编辑!</em> <tt>vipw</tt><A NAME="2510">&#160;</A>锁定了这个文件,其他命令这时不能更新它。
设定口令域为"<tt>*</tt>",这样不能登录。
<LI>类似,如果要创建新组,用<tt>vigr</tt><A NAME="2514">&#160;</A>编辑<tt>/etc/group</tt><A NAME="2512">&#160;</A>。
<LI>用<tt>mkdir</tt><A NAME="2516">&#160;</A>产生用户的家目录。 
<LI>将<tt>/etc/skel</tt><A NAME="2518">&#160;</A>中的文件复制到新的家目录中。
<LI>用<tt>chown</tt><A NAME="2520">&#160;</A>和<tt>chmod</tt><A NAME="2522">&#160;</A>修改所有者和权限。
<tt>-R</tt>选项是最有用的。
The correct permissions vary a little from one site to another, but usually the following commands do the right thing:
<BLOCKQUOTE> <TT>
cd <i>/home/newusername</i> <BR> 
chown -R <i>username.group</i> . <BR> 
chmod -R go=u,go-w . <BR> 
chmod go= .
</TT></BLOCKQUOTE>
<LI>用<tt>passwd</tt><A NAME="2524">&#160;</A>(1)设定口令。
	</OL>
<P>
最后一步设定完口令,这个帐户就能用了。不应该在其他所有事做完之前设定口令,否则这个用户可能不允许登录while you're still copying the files.
<P>
有时需要产生不为任何人使用的虚假(dummy)帐户<A NAME="tex2html35" HREF="footnode.html#2432" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/footnode.html#2432"><IMG  ALIGN=BOTTOM ALT="gif" SRC="foot_motif.gif" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/foot_motif.gif"></A>
例如,建立一个匿名FTP服务器(这样任何人都可以从它下载文件,无须得到一个帐户),必须产生一个叫<tt>ftp</tt>的帐户。
这种情况,通常无须随后一步的口令设定。而且,最好不设,这样没有人可以使用这个帐户,除非先变成<tt>root</tt>,因为<tt>root</tt>可以变成任何用户。
<P>
<HR><A NAME="tex2html1379" HREF="node87.html" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/node87.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="tex2html1377" 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="tex2html1373" HREF="node85.html" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/node85.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="tex2html1381" 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="tex2html1382" 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="tex2html1380" HREF="node87.html" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/node87.html">Changing user properties</A>
<B>Up:</B> <A NAME="tex2html1378" HREF="node82.html" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/node82.html">Creating a user</A>
<B> Previous:</B> <A NAME="tex2html1374" HREF="node85.html" tppabs="http://linux.ccpi.gov.cn/Linux/linuxadmin/node85.html">Initial environment: /etc/skel</A>
<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 + -