Skip to content

Commit

Permalink
SERVER-7883 use getent to check user existence
Browse files Browse the repository at this point in the history
  • Loading branch information
ehershey committed Oct 12, 2013
1 parent 96effe4 commit 732c43f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion debian/mongodb-enterprise-unstable-server.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set -e
case "$1" in
configure)
# create a mongodb group and user
if ! grep -q mongodb /etc/passwd; then
if ! getent passwd mongodb >/dev/null 2>&1; then
adduser --system --no-create-home mongodb
addgroup --system mongodb
adduser mongodb mongodb
Expand Down
2 changes: 1 addition & 1 deletion debian/mongodb-org-unstable-server.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set -e
case "$1" in
configure)
# create a mongodb group and user
if ! grep -q mongodb /etc/passwd; then
if ! getent passwd mongodb >/dev/null 2>&1; then
adduser --system --no-create-home mongodb
addgroup --system mongodb
adduser mongodb mongodb
Expand Down

0 comments on commit 732c43f

Please sign in to comment.