Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-22016

changeToSecureUid.sh might collide with existing user if it is not a local user but a network managed user

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • 2.5.2
    • 3.0.0
    • stacks
    • None
    • Using Centos as the test bed

    Description

      changeToSecureUid.sh might collide with existing user if it is not a local user but a network managed user
      Currently we are doing

      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
      }
      

      This will only check local user. Network manged users are not directly present inside passwd file.

      Attachments

        1. AMBARI-22016.patch
          0.9 kB
          Aman Poonia
        2. AMBARI-22016_branch-2.6.patch
          0.9 kB
          Aman Poonia

        Issue Links

          Activity

            People

              mnpoonia Aman Poonia
              mnpoonia Aman Poonia
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: