[17b7723] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[17b7723] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="postlfs-users-groups" xreflabel="About System Users and Groups">
|
---|
| 9 | <?dbhtml filename="users.html"?>
|
---|
| 10 |
|
---|
| 11 | <sect1info>
|
---|
| 12 | <othername>$LastChangedBy$</othername>
|
---|
| 13 | <date>$Date$</date>
|
---|
| 14 | </sect1info>
|
---|
| 15 |
|
---|
| 16 | <title>About System Users and Groups</title>
|
---|
| 17 |
|
---|
| 18 | <indexterm zone="postlfs-users-groups">
|
---|
| 19 | <primary sortas="e-etc-passwd">/etc/passwd</primary>
|
---|
| 20 | </indexterm>
|
---|
| 21 |
|
---|
| 22 | <indexterm zone="postlfs-users-groups">
|
---|
| 23 | <primary sortas="e-etc-group">/etc/group</primary>
|
---|
| 24 | </indexterm>
|
---|
| 25 |
|
---|
| 26 | <indexterm zone="postlfs-users-groups">
|
---|
| 27 | <primary sortas="e-etc-login.defs">/etc/login.defs</primary>
|
---|
| 28 | </indexterm>
|
---|
| 29 |
|
---|
[ba0deaad] | 30 | <para>Throughout BLFS, many packages install programs that
|
---|
[17b7723] | 31 | run as daemons or in some way should have a user or group name
|
---|
[bccbdaea] | 32 | assigned. Generally these names are used to map a user ID (uid) or group
|
---|
[17b7723] | 33 | ID (gid) for system use. Generally the specific uid or gid numbers used
|
---|
[ba0deaad] | 34 | by these applications are not significant. The exception of course, is
|
---|
| 35 | that <systemitem class='username'>root</systemitem> has a uid and gid of 0
|
---|
| 36 | (zero) that is indeed special. The uid values are stored in
|
---|
| 37 | <filename>/etc/passwd</filename> and the gid values
|
---|
| 38 | are found in <filename>/etc/group</filename>.</para>
|
---|
[17b7723] | 39 |
|
---|
| 40 | <para>Customarily, Unix systems classify users and groups into two
|
---|
| 41 | categories: system users and regular users. The system users and groups are
|
---|
| 42 | given low numbers and regular users and groups have numeric values greater
|
---|
| 43 | than all the system values. The cutoff for these numbers is found in two
|
---|
| 44 | parameters in the <filename>/etc/login.defs</filename> configuration file.
|
---|
[014b744] | 45 | The default UID_MIN value is 1000 and the default GID_MIN value is 1000. If a
|
---|
[17b7723] | 46 | specific uid or gid value is not specified when creating a user with
|
---|
| 47 | <command>useradd</command> or a group with <command>groupadd</command> the values
|
---|
| 48 | assigned will always be above these cutoff values.</para>
|
---|
| 49 |
|
---|
[ba0deaad] | 50 | <para>Additionally, the <ulink
|
---|
| 51 | url='http://refspecs.freestandards.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/usernames.html'>
|
---|
[96ece2d7] | 52 | Linux Standard Base</ulink> recommends that system uid and gid values should be
|
---|
[17b7723] | 53 | below 100.</para>
|
---|
| 54 |
|
---|
[33ca2b6] | 55 | <para>Below is a table of suggested uid/gid values used in BLFS beyond those
|
---|
| 56 | defined in a base LFS installation. These can be changed as desired, but
|
---|
| 57 | provide a suggested set of consistent values.</para>
|
---|
[17b7723] | 58 |
|
---|
[346ae0c] | 59 | <table id="uidgid" class="uidvalues">
|
---|
[17b7723] | 60 | <title>UID/GID Suggested Values</title>
|
---|
[346ae0c] | 61 | <?dbfo table-width="2in" ?>
|
---|
| 62 | <tgroup cols="3">
|
---|
| 63 | <colspec colnum="1" colwidth="1.2in"/>
|
---|
| 64 | <colspec colnum="2" colwidth=".4in"/>
|
---|
| 65 | <colspec colnum="3" colwidth=".4in"/>
|
---|
[17b7723] | 66 | <thead>
|
---|
| 67 | <row><entry>Name</entry><entry>uid</entry><entry>gid</entry></row>
|
---|
| 68 | </thead>
|
---|
| 69 | <tbody>
|
---|
[33ca2b6] | 70 | <row><entry>bin </entry><entry> 1</entry><entry> </entry></row>
|
---|
[17b7723] | 71 | <row><entry>lp </entry><entry> 9</entry><entry> </entry></row>
|
---|
[33ca2b6] | 72 | <!--<row><entry>usb </entry><entry> </entry><entry>14</entry></row> -->
|
---|
[8dce8475] | 73 | <row><entry>adm </entry><entry> </entry><entry>16</entry></row>
|
---|
[eedba153] | 74 | <row><entry>atd </entry><entry>17</entry><entry>17</entry></row>
|
---|
[36c03b1] | 75 | <row><entry>messagebus</entry><entry>18</entry><entry>18</entry></row>
|
---|
[89475857] | 76 | <row><entry>lpadmin </entry><entry></entry><entry>19</entry></row>
|
---|
[17b7723] | 77 | <row><entry>named </entry><entry>20</entry><entry>20</entry></row>
|
---|
| 78 | <row><entry>gdm </entry><entry>21</entry><entry>21</entry></row>
|
---|
| 79 | <row><entry>fcron </entry><entry>22</entry><entry>22</entry></row>
|
---|
[d6da5da] | 80 | <row><entry>systemd-journal</entry><entry></entry><entry>23</entry></row>
|
---|
[17b7723] | 81 | <row><entry>apache </entry><entry>25</entry><entry>25</entry></row>
|
---|
[b785ab29] | 82 | <row><entry>smmsp </entry><entry>26</entry><entry>26</entry></row>
|
---|
[01996ebb] | 83 | <row><entry>polkitd </entry><entry>27</entry><entry>27</entry></row>
|
---|
[b0ff55f3] | 84 | <!-- <row><entry>courier </entry><entry>30</entry><entry>30</entry></row> -->
|
---|
[17b7723] | 85 | <row><entry>exim </entry><entry>31</entry><entry>31</entry></row>
|
---|
| 86 | <row><entry>postfix </entry><entry>32</entry><entry>32</entry></row>
|
---|
| 87 | <row><entry>postdrop</entry><entry> </entry><entry>33</entry></row>
|
---|
| 88 | <row><entry>sendmail</entry><entry>34</entry><entry> </entry></row>
|
---|
| 89 | <row><entry>mail </entry><entry> </entry><entry>34</entry></row>
|
---|
| 90 | <row><entry>vmailman</entry><entry>35</entry><entry>35</entry></row>
|
---|
| 91 | <row><entry>news </entry><entry>36</entry><entry>36</entry></row>
|
---|
[69138677] | 92 | <row><entry>kdm </entry><entry>37</entry><entry>37</entry></row>
|
---|
[17b7723] | 93 | <row><entry>mysql </entry><entry>40</entry><entry>40</entry></row>
|
---|
[5aa1d3dd] | 94 | <row><entry>postgres</entry><entry>41</entry><entry>41</entry></row>
|
---|
[17b7723] | 95 | <row><entry>ftp </entry><entry>45</entry><entry>45</entry></row>
|
---|
| 96 | <row><entry>proftpd </entry><entry>46</entry><entry>46</entry></row>
|
---|
| 97 | <row><entry>vsftpd </entry><entry>47</entry><entry>47</entry></row>
|
---|
| 98 | <row><entry>rsyncd </entry><entry>48</entry><entry>48</entry></row>
|
---|
| 99 | <row><entry>sshd </entry><entry>50</entry><entry>50</entry></row>
|
---|
| 100 | <row><entry>stunnel </entry><entry>51</entry><entry>51</entry></row>
|
---|
| 101 | <row><entry>svn </entry><entry>56</entry><entry>56</entry></row>
|
---|
[b785ab29] | 102 | <row><entry>svntest </entry><entry> </entry><entry>57</entry></row>
|
---|
[6c3a7cc] | 103 | <row><entry>pulse </entry><entry>58</entry><entry>58</entry></row>
|
---|
[8c62c89] | 104 | <row><entry>pulse-access</entry><entry></entry><entry>59</entry></row>
|
---|
[17b7723] | 105 | <row><entry>games </entry><entry>60</entry><entry>60</entry></row>
|
---|
[a23aa7b] | 106 | <row><entry>kvm </entry><entry> </entry><entry>61</entry></row>
|
---|
[a079e73c] | 107 | <row><entry>wireshark</entry><entry> </entry><entry>62</entry></row>
|
---|
[c67fd68c] | 108 | <row><entry>scanner </entry><entry> </entry><entry>70</entry></row>
|
---|
[d6da5da] | 109 | <row><entry>colord </entry><entry>71</entry><entry>71</entry></row>
|
---|
[b194f2b] | 110 | <row><entry>ldap </entry><entry>83</entry><entry>83</entry></row>
|
---|
[49547f1] | 111 | <row><entry>avahi </entry><entry>84</entry><entry>84</entry></row>
|
---|
| 112 | <row><entry>avahi-autoipd</entry><entry>85</entry><entry>85</entry></row>
|
---|
| 113 | <row><entry>netdev </entry><entry> </entry><entry>86</entry></row>
|
---|
[e38cfca] | 114 | <row><entry>ntp </entry><entry>87</entry><entry>87</entry></row>
|
---|
[d224244f] | 115 | <row><entry>unbound </entry><entry>88</entry><entry>88</entry></row>
|
---|
[b785ab29] | 116 | <row><entry>anonymous</entry><entry>98</entry><entry> </entry></row>
|
---|
[17b7723] | 117 | <row><entry>nobody </entry><entry>99</entry><entry> </entry></row>
|
---|
| 118 | <row><entry>nogroup </entry><entry> </entry><entry>99</entry></row>
|
---|
| 119 | </tbody>
|
---|
| 120 | </tgroup>
|
---|
| 121 | </table>
|
---|
| 122 |
|
---|
| 123 | <para>One value that is missing is 65534. This value is customarily assigned
|
---|
| 124 | to the user <systemitem class="username">nobody</systemitem> and group
|
---|
[a079e73c] | 125 | <systemitem class="groupname">nogroup</systemitem> and is unnecessary.
|
---|
| 126 | </para>
|
---|
[17b7723] | 127 |
|
---|
| 128 | </sect1>
|
---|