128 lines
5.8 KiB
HTML
128 lines
5.8 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
|
|
<!Converted with LaTeX2HTML 95.1 (Fri Jan 20 1995) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
|
|
<HEAD>
|
|
<TITLE>4.4.1 User management concepts</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<meta name="description" value="4.4.1 User management concepts">
|
|
<meta name="keywords" value="gs">
|
|
<meta name="resource-type" value="document">
|
|
<meta name="distribution" value="global">
|
|
<P>
|
|
<BR> <HR><A NAME=tex2html3901 HREF="node168.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3899 HREF="node166.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3893 HREF="node166.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3903 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3904 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html3902 HREF="node168.html">4.4.2 Adding users</A>
|
|
<B>Up:</B> <A NAME=tex2html3900 HREF="node166.html">4.4 Managing Users</A>
|
|
<B> Previous:</B> <A NAME=tex2html3894 HREF="node166.html">4.4 Managing Users</A>
|
|
<BR> <HR> <P>
|
|
<H2><A NAME=SECTION00641000000000000000>4.4.1 User management concepts</A></H2>
|
|
<P>
|
|
The system keeps track of a number of pieces of information about
|
|
each user. They are summarized below.
|
|
<DL COMPACT><A NAME=4355> </A>
|
|
<A NAME=4356> </A>
|
|
<DT><b>username</b>
|
|
<DD>
|
|
The username is the unique identifier given to every user on the system.
|
|
Examples of usernames are <tt>larry</tt>, <tt>karl</tt>, and <tt>mdw</tt>.
|
|
Letters and digits may be used, as well as the characters ``<tt>_</tt>''
|
|
(underscore) and ``<tt>.</tt>'' (period). Usernames are usually limited
|
|
to 8 characters in length.
|
|
<P>
|
|
<A NAME=4363> </A>
|
|
<A NAME=4364> </A>
|
|
<A NAME=4365> </A>
|
|
<DT><b>user ID</b>
|
|
<DD>
|
|
The user ID, or UID, is a unique number given to every user on the
|
|
system. The system usually keeps track of information by UID, not
|
|
username.
|
|
<P>
|
|
<A NAME=4367> </A>
|
|
<A NAME=4368> </A>
|
|
<DT><b>group ID</b>
|
|
<DD>
|
|
The group ID, or GID, is the ID of the user's default group. In
|
|
Section <A HREF="node124.html#secperms">3.9</A> we discussed group permissions; each user
|
|
belongs to one or more groups defined by the system administrator.
|
|
More about this below.
|
|
<P>
|
|
<A NAME=4371> </A>
|
|
<DT><b>password</b>
|
|
<DD>
|
|
The system also stores the user's encrypted password. The <tt>passwd</tt>
|
|
command is used to set and change user passwords.
|
|
<P>
|
|
<A NAME=4374> </A>
|
|
<DT><b>full name</b>
|
|
<DD>
|
|
The user's ``real name'' or ``full name'' is stored along with the
|
|
username. For example, the user <tt>schmoj</tt> may have the name
|
|
``Joe Schmo'' in real life.
|
|
<P>
|
|
<A NAME=4377> </A>
|
|
<A NAME=4378> </A>
|
|
<DT><b>home directory</b>
|
|
<DD>
|
|
The home directory is the directory in which the user is initially
|
|
placed at login time. Every user should have his or her own home
|
|
directory, usually found under <tt>/home</tt>.
|
|
<P>
|
|
<A NAME=4381> </A>
|
|
<A NAME=4382> </A>
|
|
<DT><b>login shell</b>
|
|
<DD>
|
|
The user's login shell is the shell which is started for the user at
|
|
login time. Examples are <tt>/bin/bash</tt> and <tt>/bin/tcsh</tt>.
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
<A NAME=4502> </A>
|
|
<A NAME=4388> </A>
|
|
The file <tt>/etc/passwd</tt> contains this information about users.
|
|
Each line in the file contains information about a single user;
|
|
the format of each line is
|
|
<P><TT> username:encrypted password:UID:GID:full name:home directory:login shell
|
|
<P></TT>
|
|
An example might be:
|
|
<P><TT> kiwi:Xv8Q981g71oKK:102:100:Laura Poole:/home/kiwi:/bin/bash
|
|
<P></TT>
|
|
<P>
|
|
As we can see, the first field, ``<tt>kiwi</tt>'', is the username.
|
|
<P>
|
|
The next field, ``<tt>Xv8Q981g71oKK</tt>'', is the encrypted password.
|
|
Passwords are not stored on the system in any human-readable format.
|
|
The password is encrypted using itself as the secret key. In other
|
|
words, you need to know the password to decrypt it. This form of
|
|
encryption is fairly secure.
|
|
<P>
|
|
Some systems use ``shadow password'' in which password information is
|
|
relegated to the file <tt>/etc/shadow</tt>. Because <tt>/etc/passwd</tt>
|
|
is world-readable, <tt>/etc/shadow</tt> provides some degree of extra
|
|
security because it is not. Shadow password provides some other features
|
|
such as password expiration and so on; we will not go into these
|
|
features here.
|
|
<P>
|
|
The third field, ``<tt>102</tt>'', is the UID. This must be unique for each
|
|
user. The fourth field, ``<tt>100</tt>'', is the GID. This user belongs
|
|
to the group numbered 100. Group information, like user information, is
|
|
stored in the file <tt>/etc/group</tt>. See Section <A HREF="node171.html#secmanagegroups">4.4.5</A>
|
|
for more information.
|
|
<P>
|
|
The fifth field is the user's full name, ``<tt>Laura Poole</tt>''. The
|
|
last two fields are the user's home directory (<tt>/home/kiwi</tt>) and
|
|
login shell (<tt>/bin/bash</tt>), respectively. It is not required
|
|
that the user's home directory be given the same name as the username.
|
|
It does help identify the directory, however.
|
|
<P>
|
|
<BR> <HR><A NAME=tex2html3901 HREF="node168.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html3899 HREF="node166.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html3893 HREF="node166.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html3903 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html3904 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html3902 HREF="node168.html">4.4.2 Adding users</A>
|
|
<B>Up:</B> <A NAME=tex2html3900 HREF="node166.html">4.4 Managing Users</A>
|
|
<B> Previous:</B> <A NAME=tex2html3894 HREF="node166.html">4.4 Managing Users</A>
|
|
<BR> <HR> <P>
|
|
<BR> <HR>
|
|
<P><ADDRESS>
|
|
<I>Matt Welsh <BR>
|
|
mdw@sunsite.unc.edu</I>
|
|
</ADDRESS>
|
|
</BODY>
|