📄 users-introduction.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="generator" content="HTML Tidy, see www.w3.org" /><title>Introduction</title><meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" /><link rel="HOME" title="FreeBSD Handbook" href="index.html" /><link rel="UP" title="Users and Basic Account Management" href="users.html" /><link rel="PREVIOUS" title="Users and Basic Account Management" href="users.html" /><link rel="NEXT" title="The Superuser Account" href="users-superuser.html" /><link rel="STYLESHEET" type="text/css" href="docbook.css" /></head><body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"alink="#0000FF"><div class="NAVHEADER"><table summary="Header navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><th colspan="3" align="center">FreeBSD Handbook</th></tr><tr><td width="10%" align="left" valign="bottom"><a href="users.html"accesskey="P">Prev</a></td><td width="80%" align="center" valign="bottom">Chapter 13 Users and Basic AccountManagement</td><td width="10%" align="right" valign="bottom"><a href="users-superuser.html"accesskey="N">Next</a></td></tr></table><hr align="LEFT" width="100%" /></div><div class="SECT1"><h1 class="SECT1"><a id="USERS-INTRODUCTION" name="USERS-INTRODUCTION">13.2Introduction</a></h1><p>All access to the system is achieved via accounts, and all processes are run by users,so user and account management are of integral importance on FreeBSD systems.</p><p>Every account on a FreeBSD system has certain information associated with it toidentify the account.</p><div class="VARIABLELIST"><dl><dt>User name</dt><dd><p>The user name as it would be typed at the <samp class="PROMPT">login:</samp> prompt.User names must be unique across the computer; you may not have two users with the sameuser name. There are a number of rules for creating valid user names, documented in <ahref="http://www.FreeBSD.org/cgi/man.cgi?query=passwd&sektion=5"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">passwd</span>(5)</span></a>; you wouldtypically use user names that consist of eight or fewer all lower case characters.</p></dd><dt>Password</dt><dd><p>Each account has a password associated with it. The password may be blank, in whichcase no password will be required to access the system. This is normally a very bad idea;every account should have a password.</p></dd><dt>User ID (UID)</dt><dd><p>The UID is a number, traditionally from 0 to 65535<a id="USERS-LARGEUIDGID"name="USERS-LARGEUIDGID" href="#FTN.USERS-LARGEUIDGID"><spanclass="footnote">[1]</span></a>, used to uniquely identify the user to the system.Internally, FreeBSD uses the UID to identify users--any FreeBSD commands that allow youto specify a user name will convert it to the UID before working with it. This means thatyou can have several accounts with different user names but the same UID. As far asFreeBSD is concerned these accounts are one user. It is unlikely you will ever need to dothis.</p></dd><dt>Group ID (GID)</dt><dd><p>The GID is a number, traditionally from 0 to 65535<ahref="users-introduction.html#FTN.USERS-LARGEUIDGID"><spanclass="footnote">[1]</span></a>, used to uniquely identify the primary group that theuser belongs to. Groups are a mechanism for controlling access to resources based on auser's GID rather than their UID. This can significantly reduce the size of someconfiguration files. A user may also be in more than one group.</p></dd><dt>Login class</dt><dd><p>Login classes are an extension to the group mechanism that provide additionalflexibility when tailoring the system to different users.</p></dd><dt>Password change time</dt><dd><p>By default FreeBSD does not force users to change their passwords periodically. Youcan enforce this on a per-user basis, forcing some or all of your users to change theirpasswords after a certain amount of time has elapsed.</p></dd><dt>Account expiry time</dt><dd><p>By default FreeBSD does not expire accounts. If you are creating accounts that youknow have a limited lifespan, for example, in a school where you have accounts for thestudents, then you can specify when the account expires. After the expiry time haselapsed the account cannot be used to log in to the system, although the account'sdirectories and files will remain.</p></dd><dt>User's full name</dt><dd><p>The user name uniquely identifies the account to FreeBSD, but does not necessarilyreflect the user's real name. This information can be associated with the account.</p></dd><dt>Home directory</dt><dd><p>The home directory is the full path to a directory on the system in which the userwill start when logging on to the system. A common convention is to put all user homedirectories under <tt class="FILENAME">/home/<var class="REPLACEABLE">username</var></tt>or <tt class="FILENAME">/usr/home/<var class="REPLACEABLE">username</var></tt>. The userwould store their personal files in their home directory, and any directories they maycreate in there.</p></dd><dt>User shell</dt><dd><p>The shell provides the default environment users use to interact with the system.There are many different kinds of shells, and experienced users will have their ownpreferences, which can be reflected in their account settings.</p></dd></dl></div><p>There are three main types of accounts: the <ahref="users-superuser.html">Superuser</a>, <a href="users-system.html">system users</a>,and <a href="users-user.html">user accounts</a>. The Superuser account, usually called<tt class="USERNAME">root</tt>, is used to manage the system with no limitations onprivileges. System users run services. Finally, user accounts are used by real people,who log on, read mail, and so forth.</p></div><h3 class="FOOTNOTES">Notes</h3><table border="0" class="FOOTNOTES" width="100%"><tr><td align="LEFT" valign="TOP" width="5%"><a id="FTN.USERS-LARGEUIDGID"name="FTN.USERS-LARGEUIDGID" href="users-introduction.html#USERS-LARGEUIDGID"><spanclass="footnote">[1]</span></a></td><td align="LEFT" valign="TOP" width="95%"><p>It is possible to use UID/GIDs as large as 4294967295, but such IDs can cause seriousproblems with software that makes assumptions about the values of IDs.</p></td></tr></table><div class="NAVFOOTER"><hr align="LEFT" width="100%" /><table summary="Footer navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><td width="33%" align="left" valign="top"><a href="users.html"accesskey="P">Prev</a></td><td width="34%" align="center" valign="top"><a href="index.html"accesskey="H">Home</a></td><td width="33%" align="right" valign="top"><a href="users-superuser.html"accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">Users and Basic Account Management</td><td width="34%" align="center" valign="top"><a href="users.html"accesskey="U">Up</a></td><td width="33%" align="right" valign="top">The Superuser Account</td></tr></table></div><p align="center"><small>This, and other documents, can be downloaded from <ahref="ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/">ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/</a>.</small></p><p align="center"><small>For questions about FreeBSD, read the <ahref="http://www.FreeBSD.org/docs.html">documentation</a> before contacting <<ahref="mailto:questions@FreeBSD.org">questions@FreeBSD.org</a>>.<br />For questions about this documentation, e-mail <<ahref="mailto:doc@FreeBSD.org">doc@FreeBSD.org</a>>.</small></p></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -