Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-7883

debian install fails if mongodb user already exists

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.4
    • Affects Version/s: None
    • Component/s: Packaging
    • Labels:
      None
    • Fully Compatible
    • Linux

      Reported in GG:
      https://groups.google.com/forum/?fromgroups=#!topic/mongodb-user/k3aYsAU85ko

      The Debian package is looking in /etc/passwd for user mongodb, which in my case, it doesn't find (nor do I). However, I'm peforming this installation in a rather more complex environment in which there are LDAP users defined which do not appear in /etc/passwd of course.

      The solution would be to be more careful using adduser to insert the new mongodb user, something like:

      id=`grep mongodb /etc/passwd`
      
      if [ ! id mongodb ]; then
        adduser --system --no-create-home mongodb
        addgroup --system mongodb
        adduser mongodb mongodb
        ...
      

      I'm sorry someone in our Ops team decided that a mongodb user would be a good idea to have, but I can't do anything about that and it shouldn't really hinder my MongoDB installation but for needing a little tighter coding in the post install/configure phase.

      The solution is to hack the Debian package (DEBIAN/postinst). Ugh. I hope 10gen is listening and can offer a fix soon?

      Hope this helps someone else scratching his or her head.

      Russ Bateman

            Assignee:
            ernie.hershey@mongodb.com Ernie Hershey (Inactive)
            Reporter:
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: