From abc2b45dfa39c2dde64348b1cf5feed9c9677e20 Mon Sep 17 00:00:00 2001 From: Eric Yang Date: Tue, 4 Oct 2011 00:13:58 +0000 Subject: [PATCH] HADOOP-7603. Set hdfs, mapred uid, and hadoop uid to fixed numbers. (Eric Yang) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1178644 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 2 ++ .../hadoop-hdfs/src/main/packages/deb/hadoop.control/preinst | 2 +- .../hadoop-hdfs/src/main/packages/rpm/spec/hadoop-hdfs.spec | 4 ++-- .../src/packages/deb/hadoop.control/preinst | 2 +- .../src/packages/rpm/spec/hadoop-mapred.spec | 4 ++-- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index b4fbe77e98..8ecca7591a 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -641,6 +641,8 @@ Release 0.23.0 - Unreleased HADOOP-7691. Fixed conflict uid for install packages. (Eric Yang) + HADOOP-7603. Set hdfs, mapred uid, and hadoop uid to fixed numbers. (Eric Yang) + Release 0.22.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/packages/deb/hadoop.control/preinst b/hadoop-hdfs-project/hadoop-hdfs/src/main/packages/deb/hadoop.control/preinst index 940b7add67..13820227f3 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/packages/deb/hadoop.control/preinst +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/packages/deb/hadoop.control/preinst @@ -15,4 +15,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -/usr/sbin/useradd --comment "Hadoop HDFS" --shell /bin/bash -M -r --groups hadoop --home /var/lib/hadoop/hdfs hdfs 2> /dev/null || : +/usr/sbin/useradd --comment "Hadoop HDFS" -u 201 --shell /bin/bash -M -r --groups hadoop --home /var/lib/hadoop/hdfs hdfs 2> /dev/null || : diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/packages/rpm/spec/hadoop-hdfs.spec b/hadoop-hdfs-project/hadoop-hdfs/src/main/packages/rpm/spec/hadoop-hdfs.spec index d2dcf4f2d8..edc4a3b8ac 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/packages/rpm/spec/hadoop-hdfs.spec +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/packages/rpm/spec/hadoop-hdfs.spec @@ -144,8 +144,8 @@ mv ${RPM_BUILD_DIR}/%{_final_name}/share/* ${RPM_BUILD_DIR}%{_share_dir} rm -rf ${RPM_BUILD_DIR}/%{_final_name}/etc %pre -getent group hadoop 2>/dev/null >/dev/null || /usr/sbin/groupadd -r hadoop -/usr/sbin/useradd --comment "Hadoop HDFS" --shell /bin/bash -M -r --groups hadoop --home %{_var_dir}/hdfs hdfs 2> /dev/null || : +getent group hadoop 2>/dev/null >/dev/null || /usr/sbin/groupadd -g 123 -r hadoop +/usr/sbin/useradd --comment "Hadoop HDFS" -u 201 --shell /bin/bash -M -r --groups hadoop --home %{_var_dir}/hdfs hdfs 2> /dev/null || : %post bash ${RPM_INSTALL_PREFIX0}/sbin/update-hdfs-env.sh \ diff --git a/hadoop-mapreduce-project/src/packages/deb/hadoop.control/preinst b/hadoop-mapreduce-project/src/packages/deb/hadoop.control/preinst index 4cc3cc4f87..229834640c 100644 --- a/hadoop-mapreduce-project/src/packages/deb/hadoop.control/preinst +++ b/hadoop-mapreduce-project/src/packages/deb/hadoop.control/preinst @@ -15,4 +15,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -/usr/sbin/useradd --comment "Hadoop MapReduce" --shell /bin/bash -M -r --groups hadoop --home /var/lib/hadoop/mapred mapred 2> /dev/null || : +/usr/sbin/useradd --comment "Hadoop MapReduce" -u 202 --shell /bin/bash -M -r --groups hadoop --home /var/lib/hadoop/mapred mapred 2> /dev/null || : diff --git a/hadoop-mapreduce-project/src/packages/rpm/spec/hadoop-mapred.spec b/hadoop-mapreduce-project/src/packages/rpm/spec/hadoop-mapred.spec index 70dfe9361b..85af48fd89 100644 --- a/hadoop-mapreduce-project/src/packages/rpm/spec/hadoop-mapred.spec +++ b/hadoop-mapreduce-project/src/packages/rpm/spec/hadoop-mapred.spec @@ -142,8 +142,8 @@ mv ${RPM_BUILD_DIR}/%{_final_name}/share/* ${RPM_BUILD_DIR}%{_share_dir} rm -rf ${RPM_BUILD_DIR}/%{_final_name}/etc %pre -getent group hadoop 2>/dev/null >/dev/null || /usr/sbin/groupadd -r hadoop -/usr/sbin/useradd --comment "Hadoop MapReduce" --shell /bin/bash -M -r --groups hadoop --home %{_var_dir}/mapred mapred 2> /dev/null || : +getent group hadoop 2>/dev/null >/dev/null || /usr/sbin/groupadd -g 123 -r hadoop +/usr/sbin/useradd --comment "Hadoop MapReduce" -u 202 --shell /bin/bash -M -r --groups hadoop --home %{_var_dir}/mapred mapred 2> /dev/null || : %post bash ${RPM_INSTALL_PREFIX0}/sbin/update-mapred-env.sh \