You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Difference between revisions of "UID"

From Wikitech-static
Jump to navigation Jump to search
imported>Dzahn
(add zuul, fix jenkins UID)
imported>Jbond
Line 1: Line 1:
===reserved UIDs & GIDs===
===reserved UIDs & GIDs===


This is most likely not the desired state yet, but just starting out with the current situation on <s>[[fenari]]</s>. Should be edited to reflect the desired situation, being equal on all servers.
Althugh we try to keep this up-to-date it the authoritative source is [https://gerrit.wikimedia.org/r/plugins/gitiles/operations/puppet/+/production/modules/admin/data/data.yaml admin.yaml]


'''You can and should now reserve UIDs in the puppet admin module and use systemd-sysuser, like in [https://gerrit.wikimedia.org/r/c/operations/puppet/+/606286 this example].'''
'''Make sure to add reservation entry to admin.yaml'''
 
If you want the account to be created every where you must reserve the UID in the puppet admin module and use systemd-sysuser. like in [https://gerrit.wikimedia.org/r/c/operations/puppet/+/573991/7/modules/admin/data/data.yaml this example].
 
If the user will just exist on a few machines then you should resever the account in the admin module with a commented block.  like in [https://gerrit.wikimedia.org/r/c/operations/puppet/+/666133/5/modules/admin/data/data.yaml this example], then create the user with a normal user block e.g.
 
<syntaxhighlight lang="puppet">
    systemd::sysuser { 'git':
      content    => [
      'usertype' => 'u',
      'name'    => 'git',
      'id'      => 915:915,
      'gecos'    => 'git used by GitLab',
      'home_dir' => '/var/opt/gitlab',
      ]
    }
</syntaxhighlight>


*(table columns are sortable)
*(table columns are sortable)
Line 28: Line 45:
| 499 || 499 || trebuchet  
| 499 || 499 || trebuchet  
|-
|-
| 903 || 903 || jenkins (defined in admin module!)
| 901 || 901 || reprepro
|-
| 902 || 902 || swift
|-
| 903 || 903 || hdfs (previously jenkins)
|-
| 904 || 904 || yarn
|-
| 905 || 905 || mapred
|-
|906  || 906 || analytics
|-
|906  || 906 || analytics
|-
|907  || 907 || druid
|-
|908  || 908 || hadoop
|-
|909  || 909 || analytics-privatedata
|-
|910  || 910 || analytics-product
|-
|911  || 911 || analytics-search
|-
|912  || 912 || analytics-research
|-
|913  || 913 || analytics-platform-eng
|-
|914  || 914 || alluxio
|-
|-
| 904 || 904 || zuul (defined in admin module!)
|915  || 915 || git
|-
|-
| 10002 || 10002 || l10nupdate
| 10002 || 10002 || l10nupdate

Revision as of 11:07, 11 October 2021

reserved UIDs & GIDs

Althugh we try to keep this up-to-date it the authoritative source is admin.yaml

Make sure to add reservation entry to admin.yaml

If you want the account to be created every where you must reserve the UID in the puppet admin module and use systemd-sysuser. like in this example.

If the user will just exist on a few machines then you should resever the account in the admin module with a commented block. like in this example, then create the user with a normal user block e.g.

    systemd::sysuser { 'git':
      content    => [
      'usertype' => 'u',
      'name'     => 'git',
      'id'       => 915:915,
      'gecos'    => 'git used by GitLab',
      'home_dir' => '/var/opt/gitlab',
      ]
    }
  • (table columns are sortable)
UID GID user name
33 33 www-data
48 48 apache
107 112 puppet
110 115 nagios
111 116 mwdeploy
444 444 gerrit2
445 445 rancid
498 498 phd (phabricator)
499 499 trebuchet
901 901 reprepro
902 902 swift
903 903 hdfs (previously jenkins)
904 904 yarn
905 905 mapred
906 906 analytics
906 906 analytics
907 907 druid
908 908 hadoop
909 909 analytics-privatedata
910 910 analytics-product
911 911 analytics-search
912 912 analytics-research
913 913 analytics-platform-eng
914 914 alluxio
915 915 git
10002 10002 l10nupdate

permission/security hierarchy

the security hierarchy looks as follows as decribed by TimStarling:

  • root > wikidev > mwdeploy > www-data
    • root can own wikidev but wikidev can't own root
    • wikidev can own mwdeploy but mwdeploy can't own wikidev
    • scripts owned by mwdeploy can only be run by www-data
    • everything has to su to www-data before running maintenance scripts


also see: task T79786