Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6560C200D14 for ; Tue, 3 Oct 2017 13:12:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 642671609D2; Tue, 3 Oct 2017 11:12:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AA6F31609DD for ; Tue, 3 Oct 2017 13:12:06 +0200 (CEST) Received: (qmail 22355 invoked by uid 500); 3 Oct 2017 11:12:05 -0000 Mailing-List: contact issues-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list issues@ambari.apache.org Received: (qmail 22346 invoked by uid 99); 3 Oct 2017 11:12:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Oct 2017 11:12:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 564EB180FAE for ; Tue, 3 Oct 2017 11:12:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.201 X-Spam-Level: X-Spam-Status: No, score=-99.201 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 1x56kQn0fomi for ; Tue, 3 Oct 2017 11:12:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id A7BCE5FDEA for ; Tue, 3 Oct 2017 11:12:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 961D6E0F7B for ; Tue, 3 Oct 2017 11:12:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id C3A86242D8 for ; Tue, 3 Oct 2017 11:12:00 +0000 (UTC) Date: Tue, 3 Oct 2017 11:12:00 +0000 (UTC) From: "Aman Poonia (JIRA)" To: issues@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMBARI-22016) changeToSecureUid.sh might collide with existing user if it is not a local user but a network managed user MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 03 Oct 2017 11:12:07 -0000 [ https://issues.apache.org/jira/browse/AMBARI-22016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aman Poonia updated AMBARI-22016: --------------------------------- Status: Patch Available (was: Open) > changeToSecureUid.sh might collide with existing user if it is not a local user but a network managed user > ---------------------------------------------------------------------------------------------------------- > > Key: AMBARI-22016 > URL: https://issues.apache.org/jira/browse/AMBARI-22016 > Project: Ambari > Issue Type: Bug > Components: stacks > Affects Versions: 2.5.2 > Environment: Using Centos as the test bed > Reporter: Aman Poonia > Assignee: Aman Poonia > Fix For: 2.6.0 > > Attachments: AMBARI-22016_branch-2.6.patch, AMBARI-22016.patch > > > changeToSecureUid.sh might collide with existing user if it is not a local user but a network managed user > Currently we are doing > {code:java} > function find_available_uid() { > for ((i=1001; i<=2000; i++)) > do > grep -q $i /etc/passwd > if [ "$?" -ne 0 ] > then > newUid=$i > break > fi > done > } > {code} > This will only check local user. Network manged users are not directly present inside passwd file. -- This message was sent by Atlassian JIRA (v6.4.14#64029)