Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/295029

Change subject: labstore: Fix home directory calculation for user accounts
......................................................................

labstore: Fix home directory calculation for user accounts

Currently, for user accounts, create-dbusers calculates the home
directory with the wiki user name instead of the shell user name,
i. e. for the user account "scfc", it tries to create a file at
"/srv/project/tools/home/Tim Landscheidt/replica.my.cnf" which will
fail for all user accounts where wiki and shell user name differ.
This change instead uses the shell user name.

Bug: T138103
Change-Id: I061ee880c050c4cbf3913120edbeaa9ed73dd801
---
M modules/labstore/files/create-dbusers
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/29/295029/1

diff --git a/modules/labstore/files/create-dbusers 
b/modules/labstore/files/create-dbusers
index a867580..3469e64 100755
--- a/modules/labstore/files/create-dbusers
+++ b/modules/labstore/files/create-dbusers
@@ -91,7 +91,7 @@
                 'ou=people,dc=wikimedia,dc=org',
                 '(%s)' % search_string,
                 ldap3.SEARCH_SCOPE_WHOLE_SUBTREE,
-                attributes=['uidNumber', 'cn']
+                attributes=['uid', 'uidNumber']
             )
             if len(conn.response) == 0:
                 logging.error(
@@ -104,7 +104,7 @@
             attrs = conn.response[0]['attributes']
             users.append(cls(
                 projectname,
-                attrs['cn'][0],
+                attrs['uid'][0],
                 attrs['uidNumber'][0],
                 'user'
             ))

-- 
To view, visit https://gerrit.wikimedia.org/r/295029
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I061ee880c050c4cbf3913120edbeaa9ed73dd801
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt <t...@tim-landscheidt.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to