2005-06-01 09:03:19 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
|
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
|
|
%general-entities;
|
|
|
|
]>
|
|
|
|
|
|
|
|
<sect1 id="postlfs-users-groups" xreflabel="About System Users and Groups">
|
|
|
|
<?dbhtml filename="users.html"?>
|
|
|
|
|
|
|
|
<sect1info>
|
|
|
|
<othername>$LastChangedBy$</othername>
|
|
|
|
<date>$Date$</date>
|
|
|
|
</sect1info>
|
|
|
|
|
|
|
|
<title>About System Users and Groups</title>
|
|
|
|
|
|
|
|
<indexterm zone="postlfs-users-groups">
|
|
|
|
<primary sortas="e-etc-passwd">/etc/passwd</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<indexterm zone="postlfs-users-groups">
|
|
|
|
<primary sortas="e-etc-group">/etc/group</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<indexterm zone="postlfs-users-groups">
|
|
|
|
<primary sortas="e-etc-login.defs">/etc/login.defs</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
2005-07-23 02:47:45 +08:00
|
|
|
<para>Throughout BLFS, many packages install programs that
|
2005-06-01 09:03:19 +08:00
|
|
|
run as daemons or in some way should have a user or group name
|
2005-11-30 03:07:13 +08:00
|
|
|
assigned. Generally these names are used to map a user ID (uid) or group
|
2005-06-01 09:03:19 +08:00
|
|
|
ID (gid) for system use. Generally the specific uid or gid numbers used
|
2005-07-23 02:47:45 +08:00
|
|
|
by these applications are not significant. The exception of course, is
|
|
|
|
that <systemitem class='username'>root</systemitem> has a uid and gid of 0
|
|
|
|
(zero) that is indeed special. The uid values are stored in
|
|
|
|
<filename>/etc/passwd</filename> and the gid values
|
|
|
|
are found in <filename>/etc/group</filename>.</para>
|
2005-06-01 09:03:19 +08:00
|
|
|
|
|
|
|
<para>Customarily, Unix systems classify users and groups into two
|
|
|
|
categories: system users and regular users. The system users and groups are
|
|
|
|
given low numbers and regular users and groups have numeric values greater
|
|
|
|
than all the system values. The cutoff for these numbers is found in two
|
|
|
|
parameters in the <filename>/etc/login.defs</filename> configuration file.
|
|
|
|
The default UID_MIN value is 1000 and the default GID_MIN value is 100. If a
|
|
|
|
specific uid or gid value is not specified when creating a user with
|
|
|
|
<command>useradd</command> or a group with <command>groupadd</command> the values
|
|
|
|
assigned will always be above these cutoff values.</para>
|
|
|
|
|
2005-07-23 02:47:45 +08:00
|
|
|
<para>Additionally, the <ulink
|
|
|
|
url='http://refspecs.freestandards.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/usernames.html'>
|
2006-02-13 06:02:25 +08:00
|
|
|
Linux Standard Base</ulink> recommends that system uid and gid values should be
|
2005-06-01 09:03:19 +08:00
|
|
|
below 100.</para>
|
|
|
|
|
|
|
|
<para>Below is a table of suggested uid/gid values used in BLFS. These can
|
|
|
|
be changed as desired, but provide a suggested set of consistent values.</para>
|
|
|
|
|
|
|
|
<table id="uidgid" class='uidvalues'>
|
|
|
|
<title>UID/GID Suggested Values</title>
|
|
|
|
<tgroup cols='3' colsep='0' rowsep='0'>
|
|
|
|
<thead>
|
|
|
|
<row><entry>Name</entry><entry>uid</entry><entry>gid</entry></row>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<row><entry>bin </entry><entry> 1</entry><entry> 1</entry></row>
|
|
|
|
<row><entry>lp </entry><entry> 9</entry><entry> </entry></row>
|
|
|
|
<row><entry>usb </entry><entry> </entry><entry>14</entry></row>
|
2005-09-27 09:36:25 +08:00
|
|
|
<row><entry>messagebus</entry><entry>18</entry><entry>18</entry></row>
|
|
|
|
<row><entry>haldaemon</entry><entry>19</entry><entry>19</entry></row>
|
2005-06-01 09:03:19 +08:00
|
|
|
<row><entry>named </entry><entry>20</entry><entry>20</entry></row>
|
|
|
|
<row><entry>gdm </entry><entry>21</entry><entry>21</entry></row>
|
|
|
|
<row><entry>fcron </entry><entry>22</entry><entry>22</entry></row>
|
|
|
|
<row><entry>apache </entry><entry>25</entry><entry>25</entry></row>
|
2005-06-06 05:06:40 +08:00
|
|
|
<row><entry>smmsp </entry><entry>26</entry><entry>26</entry></row>
|
2005-07-30 12:21:46 +08:00
|
|
|
<!-- <row><entry>courier </entry><entry>30</entry><entry>30</entry></row> -->
|
2005-06-01 09:03:19 +08:00
|
|
|
<row><entry>exim </entry><entry>31</entry><entry>31</entry></row>
|
|
|
|
<row><entry>postfix </entry><entry>32</entry><entry>32</entry></row>
|
|
|
|
<row><entry>postdrop</entry><entry> </entry><entry>33</entry></row>
|
|
|
|
<row><entry>sendmail</entry><entry>34</entry><entry> </entry></row>
|
|
|
|
<row><entry>mail </entry><entry> </entry><entry>34</entry></row>
|
|
|
|
<row><entry>vmailman</entry><entry>35</entry><entry>35</entry></row>
|
|
|
|
<row><entry>news </entry><entry>36</entry><entry>36</entry></row>
|
|
|
|
<row><entry>mysql </entry><entry>40</entry><entry>40</entry></row>
|
2005-12-14 20:29:05 +08:00
|
|
|
<row><entry>postgres</entry><entry>41</entry><entry>41</entry></row>
|
2005-06-01 09:03:19 +08:00
|
|
|
<row><entry>ftp </entry><entry>45</entry><entry>45</entry></row>
|
|
|
|
<row><entry>proftpd </entry><entry>46</entry><entry>46</entry></row>
|
|
|
|
<row><entry>vsftpd </entry><entry>47</entry><entry>47</entry></row>
|
|
|
|
<row><entry>rsyncd </entry><entry>48</entry><entry>48</entry></row>
|
|
|
|
<row><entry>sshd </entry><entry>50</entry><entry>50</entry></row>
|
|
|
|
<row><entry>stunnel </entry><entry>51</entry><entry>51</entry></row>
|
|
|
|
<row><entry>svn </entry><entry>56</entry><entry>56</entry></row>
|
2005-06-06 05:06:40 +08:00
|
|
|
<row><entry>svntest </entry><entry> </entry><entry>57</entry></row>
|
2005-06-01 09:03:19 +08:00
|
|
|
<row><entry>games </entry><entry>60</entry><entry>60</entry></row>
|
2005-06-06 05:06:40 +08:00
|
|
|
<row><entry>anonymous</entry><entry>98</entry><entry> </entry></row>
|
2005-06-01 09:03:19 +08:00
|
|
|
<row><entry>nobody </entry><entry>99</entry><entry> </entry></row>
|
|
|
|
<row><entry>nogroup </entry><entry> </entry><entry>99</entry></row>
|
|
|
|
</tbody>
|
|
|
|
</tgroup>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<para>One value that is missing is 65534. This value is customarily assigned
|
|
|
|
to the user <systemitem class="username">nobody</systemitem> and group
|
|
|
|
<systemitem class="groupname">nogroup</systemitem> and is unnecessary. The
|
|
|
|
issue is explained in more detail in the first note in the <xref
|
|
|
|
linkend='nfs-utils-install'/> section.</para>
|
|
|
|
|
|
|
|
</sect1>
|