[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 | <date>$Date$</date>
|
---|
| 13 | </sect1info>
|
---|
| 14 |
|
---|
| 15 | <title>About System Users and Groups</title>
|
---|
| 16 |
|
---|
| 17 | <indexterm zone="postlfs-users-groups">
|
---|
| 18 | <primary sortas="e-etc-passwd">/etc/passwd</primary>
|
---|
| 19 | </indexterm>
|
---|
| 20 |
|
---|
| 21 | <indexterm zone="postlfs-users-groups">
|
---|
| 22 | <primary sortas="e-etc-group">/etc/group</primary>
|
---|
| 23 | </indexterm>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="postlfs-users-groups">
|
---|
| 26 | <primary sortas="e-etc-login.defs">/etc/login.defs</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
[81a73ed8] | 29 | <para>
|
---|
| 30 | Throughout BLFS, many packages install programs that run as daemons or in
|
---|
| 31 | some way should have a user or group name assigned. Generally these
|
---|
| 32 | names are used to map a user ID (uid) or group ID (gid) for system use.
|
---|
| 33 | Generally the specific uid or gid numbers used by these applications are
|
---|
| 34 | not significant. The exception of course, is that <systemitem
|
---|
| 35 | class='username'>root</systemitem> has a uid and gid of 0 (zero) that
|
---|
| 36 | is indeed special. The uid values are stored in
|
---|
| 37 | <filename>/etc/passwd</filename> and the gid values are found in
|
---|
| 38 | <filename>/etc/group</filename>.
|
---|
| 39 | </para>
|
---|
[17b7723] | 40 |
|
---|
[81a73ed8] | 41 | <para>
|
---|
| 42 | Customarily, Unix systems classify users and groups into two categories:
|
---|
| 43 | system users and regular users. The system users and groups are given
|
---|
| 44 | low numbers and regular users and groups have numeric values greater
|
---|
| 45 | than all the system values. The cutoff for these numbers is found in
|
---|
| 46 | two parameters in the <filename>/etc/login.defs</filename> configuration
|
---|
| 47 | file. The default UID_MIN value is 1000 and the default GID_MIN value
|
---|
| 48 | is 1000. If a specific uid or gid value is not specified when creating
|
---|
| 49 | a user with <command>useradd</command> or a group with
|
---|
| 50 | <command>groupadd</command> the values assigned will always be above
|
---|
| 51 | these cutoff values.
|
---|
| 52 | </para>
|
---|
[17b7723] | 53 |
|
---|
[81a73ed8] | 54 | <para>
|
---|
| 55 | Additionally, the <ulink url=
|
---|
| 56 | "http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/usernames.html">
|
---|
| 57 | Linux Standard Base</ulink> recommends that system uid and gid values
|
---|
| 58 | should be below 100.
|
---|
| 59 | </para>
|
---|
[17b7723] | 60 |
|
---|
[81a73ed8] | 61 | <para>
|
---|
| 62 | Below is a table of suggested uid/gid values used in BLFS beyond those
|
---|
| 63 | defined in a base LFS installation. These can be changed as desired, but
|
---|
| 64 | provide a suggested set of consistent values.
|
---|
| 65 | </para>
|
---|
[17b7723] | 66 |
|
---|
[346ae0c] | 67 | <table id="uidgid" class="uidvalues">
|
---|
[17b7723] | 68 | <title>UID/GID Suggested Values</title>
|
---|
[346ae0c] | 69 | <?dbfo table-width="2in" ?>
|
---|
| 70 | <tgroup cols="3">
|
---|
| 71 | <colspec colnum="1" colwidth="1.2in"/>
|
---|
| 72 | <colspec colnum="2" colwidth=".4in"/>
|
---|
| 73 | <colspec colnum="3" colwidth=".4in"/>
|
---|
[17b7723] | 74 | <thead>
|
---|
| 75 | <row><entry>Name</entry><entry>uid</entry><entry>gid</entry></row>
|
---|
| 76 | </thead>
|
---|
| 77 | <tbody>
|
---|
[33ca2b6] | 78 | <row><entry>bin </entry><entry> 1</entry><entry> </entry></row>
|
---|
[17b7723] | 79 | <row><entry>lp </entry><entry> 9</entry><entry> </entry></row>
|
---|
[33ca2b6] | 80 | <!--<row><entry>usb </entry><entry> </entry><entry>14</entry></row> -->
|
---|
[8dce8475] | 81 | <row><entry>adm </entry><entry> </entry><entry>16</entry></row>
|
---|
[eedba153] | 82 | <row><entry>atd </entry><entry>17</entry><entry>17</entry></row>
|
---|
[36c03b1] | 83 | <row><entry>messagebus</entry><entry>18</entry><entry>18</entry></row>
|
---|
[89475857] | 84 | <row><entry>lpadmin </entry><entry></entry><entry>19</entry></row>
|
---|
[17b7723] | 85 | <row><entry>named </entry><entry>20</entry><entry>20</entry></row>
|
---|
| 86 | <row><entry>gdm </entry><entry>21</entry><entry>21</entry></row>
|
---|
| 87 | <row><entry>fcron </entry><entry>22</entry><entry>22</entry></row>
|
---|
[03b8993] | 88 | <row><entry>systemd-journal</entry><entry>23</entry><entry>23</entry></row>
|
---|
[17b7723] | 89 | <row><entry>apache </entry><entry>25</entry><entry>25</entry></row>
|
---|
[b785ab29] | 90 | <row><entry>smmsp </entry><entry>26</entry><entry>26</entry></row>
|
---|
[01996ebb] | 91 | <row><entry>polkitd </entry><entry>27</entry><entry>27</entry></row>
|
---|
[41dbe86f] | 92 | <row><entry>rpc </entry><entry>28</entry><entry>28</entry></row>
|
---|
[b0ff55f3] | 93 | <!-- <row><entry>courier </entry><entry>30</entry><entry>30</entry></row> -->
|
---|
[17b7723] | 94 | <row><entry>exim </entry><entry>31</entry><entry>31</entry></row>
|
---|
| 95 | <row><entry>postfix </entry><entry>32</entry><entry>32</entry></row>
|
---|
| 96 | <row><entry>postdrop</entry><entry> </entry><entry>33</entry></row>
|
---|
| 97 | <row><entry>sendmail</entry><entry>34</entry><entry> </entry></row>
|
---|
| 98 | <row><entry>mail </entry><entry> </entry><entry>34</entry></row>
|
---|
| 99 | <row><entry>vmailman</entry><entry>35</entry><entry>35</entry></row>
|
---|
| 100 | <row><entry>news </entry><entry>36</entry><entry>36</entry></row>
|
---|
[69138677] | 101 | <row><entry>kdm </entry><entry>37</entry><entry>37</entry></row>
|
---|
[afe4b852] | 102 | <row><entry>fetchmail</entry><entry>38</entry><entry> </entry></row>
|
---|
[17b7723] | 103 | <row><entry>mysql </entry><entry>40</entry><entry>40</entry></row>
|
---|
[5aa1d3dd] | 104 | <row><entry>postgres</entry><entry>41</entry><entry>41</entry></row>
|
---|
[5b4ee76] | 105 | <row><entry>dovecot </entry><entry>42</entry><entry>42</entry></row>
|
---|
| 106 | <row><entry>dovenull</entry><entry>43</entry><entry>43</entry></row>
|
---|
[17b7723] | 107 | <row><entry>ftp </entry><entry>45</entry><entry>45</entry></row>
|
---|
| 108 | <row><entry>proftpd </entry><entry>46</entry><entry>46</entry></row>
|
---|
| 109 | <row><entry>vsftpd </entry><entry>47</entry><entry>47</entry></row>
|
---|
| 110 | <row><entry>rsyncd </entry><entry>48</entry><entry>48</entry></row>
|
---|
| 111 | <row><entry>sshd </entry><entry>50</entry><entry>50</entry></row>
|
---|
| 112 | <row><entry>stunnel </entry><entry>51</entry><entry>51</entry></row>
|
---|
[0ed08835] | 113 | <row><entry>dhcpcd </entry><entry>52</entry><entry>52</entry></row>
|
---|
[17b7723] | 114 | <row><entry>svn </entry><entry>56</entry><entry>56</entry></row>
|
---|
[b785ab29] | 115 | <row><entry>svntest </entry><entry> </entry><entry>57</entry></row>
|
---|
[5362771] | 116 | <row><entry>git </entry><entry>58</entry><entry>58</entry></row>
|
---|
[88136e4d] | 117 | <!-- <row><entry>pulse </entry><entry>58</entry><entry>58</entry></row>
|
---|
[8c62c89] | 118 | <row><entry>pulse-access</entry><entry></entry><entry>59</entry></row>
|
---|
[88136e4d] | 119 | -->
|
---|
[17b7723] | 120 | <row><entry>games </entry><entry>60</entry><entry>60</entry></row>
|
---|
[a23aa7b] | 121 | <row><entry>kvm </entry><entry> </entry><entry>61</entry></row>
|
---|
[a079e73c] | 122 | <row><entry>wireshark</entry><entry> </entry><entry>62</entry></row>
|
---|
[dcfe40ea] | 123 | <row><entry>lightdm </entry><entry>63</entry><entry>63</entry></row>
|
---|
[45f401ea] | 124 | <row><entry>sddm </entry><entry>64</entry><entry>64</entry></row>
|
---|
[7d4600c] | 125 | <row><entry>lightdm </entry><entry>65</entry><entry>65</entry></row>
|
---|
[ab0d3a42] | 126 | <row><entry>scanner </entry><entry> </entry><entry>70</entry></row>
|
---|
| 127 | <row><entry>colord </entry><entry>71</entry><entry>71</entry></row>
|
---|
[4fe695a] | 128 |
|
---|
| 129 | <!-- Begin systemd specific users and groups -->
|
---|
[ab0d3a42] | 130 | <row><entry>systemd-bus-proxy</entry><entry>72</entry><entry>72</entry></row>
|
---|
| 131 | <row><entry>systemd-journal-gateway</entry><entry>73</entry><entry>73</entry></row>
|
---|
| 132 | <row><entry>systemd-journal-remote</entry><entry>74</entry><entry>74</entry></row>
|
---|
| 133 | <row><entry>systemd-journal-upload</entry><entry>75</entry><entry>75</entry></row>
|
---|
| 134 | <row><entry>systemd-network</entry><entry>76</entry><entry>76</entry></row>
|
---|
| 135 | <row><entry>systemd-resolve</entry><entry>77</entry><entry>77</entry></row>
|
---|
| 136 | <row><entry>systemd-timesync</entry><entry>78</entry><entry>78</entry></row>
|
---|
[9bcef17] | 137 | <row><entry>systemd-coredump</entry><entry>79</entry><entry>79</entry></row>
|
---|
[4fe695a] | 138 | <!-- End systemd specific users and groups -->
|
---|
| 139 |
|
---|
[12d35c4] | 140 | <row><entry>uuidd </entry><entry>80</entry><entry>80</entry></row>
|
---|
[ff056c7] | 141 | <row><entry>systemd-oom</entry><entry>81</entry><entry>81</entry></row>
|
---|
[b194f2b] | 142 | <row><entry>ldap </entry><entry>83</entry><entry>83</entry></row>
|
---|
[49547f1] | 143 | <row><entry>avahi </entry><entry>84</entry><entry>84</entry></row>
|
---|
| 144 | <row><entry>avahi-autoipd</entry><entry>85</entry><entry>85</entry></row>
|
---|
| 145 | <row><entry>netdev </entry><entry> </entry><entry>86</entry></row>
|
---|
[e38cfca] | 146 | <row><entry>ntp </entry><entry>87</entry><entry>87</entry></row>
|
---|
[d224244f] | 147 | <row><entry>unbound </entry><entry>88</entry><entry>88</entry></row>
|
---|
[8e8cfd9b] | 148 | <row><entry>plugdev </entry><entry> </entry><entry>90</entry></row>
|
---|
[986d7af] | 149 | <row><entry>wheel </entry><entry> </entry><entry>97</entry></row>
|
---|
[b785ab29] | 150 | <row><entry>anonymous</entry><entry>98</entry><entry> </entry></row>
|
---|
[17b7723] | 151 | <row><entry>nobody </entry><entry>99</entry><entry> </entry></row>
|
---|
| 152 | <row><entry>nogroup </entry><entry> </entry><entry>99</entry></row>
|
---|
| 153 | </tbody>
|
---|
| 154 | </tgroup>
|
---|
| 155 | </table>
|
---|
| 156 |
|
---|
[81a73ed8] | 157 | <para>
|
---|
| 158 | One value that is missing is 65534. This value is customarily assigned
|
---|
| 159 | to the user <systemitem class="username">nobody</systemitem> and group
|
---|
| 160 | <systemitem class="groupname">nogroup</systemitem> and is unnecessary.
|
---|
[a079e73c] | 161 | </para>
|
---|
[17b7723] | 162 |
|
---|
| 163 | </sect1>
|
---|