Advertisement
lummoxx

mailman_err_overview

Sep 24th, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. RHEL5.5, mailman-2.1.9-4.el5 installed. Mailman was running, but messages sent were not being added to the list. Tried to restart mailman "service mailman restart", but it hung. Let it run a while before killing. Trying to start it, and it hangs.
  2. Have checked permissions, mm_cfg.py, no /var/lock/subsys/mailman.
  3. No output when tried to start using ./mailmanctl start either.
  4. This is a server transfer, but only hostname has changed.
  5. mailman.host.com to simply host.com
  6. changed DEFAULT_URL_HOST and DEFAULT_EMAIL_HOST to host.com
  7. ran the ./withlist command on all lists to change the URL to host.com
  8. The old host was also RHEL5.5, mailman-2.1.9-4.el5.
  9. check_perms returns no problems found.
  10. managed to uninstall with rpm -e --noscripts mailman
  11. reinstalled with yum
  12. still hangs.
  13. enabled /bin/bash on mailman user
  14. sudo su mailman
  15. ran mailmanctl -s start
  16. and it starts.
  17.  
  18. So..why won't mailman start as root, including as a service?
  19.  
  20. Added debug print statements to mailmanctl, this is the results.
  21.  
  22.  
  23. openge entered check_privs
  24. openge gid is:
  25. 41
  26. openge uid is:
  27. 41
  28. openge myuid is:
  29. 0
  30. openge check_privs - entered myuid == 0
  31. ...hangs on the line
  32. groups = [x[2] for x in grp.getgrall() if mm_cfg.MAILMAN_USER in x[3]]
  33.  
  34. def check_privs():
  35. print "openge entered check_privs"
  36. # If we're running as root (uid == 0), coerce the uid and gid to that
  37. # which Mailman was configured for, and refuse to run if we didn't coerce
  38. # the uid/gid.
  39. gid = grp.getgrnam(mm_cfg.MAILMAN_GROUP)[2]
  40. print "openge gid is: "
  41. print gid
  42. uid = pwd.getpwnam(mm_cfg.MAILMAN_USER)[2]
  43. print "openge uid is: "
  44. print uid
  45. myuid = os.getuid()
  46. print "openge myuid is: "
  47. print myuid
  48. if myuid == 0:
  49. print "openge check_privs - entered myuid == 0"
  50. # Set the process's supplimental groups.
  51. groups = [x[2] for x in grp.getgrall() if mm_cfg.MAILMAN_USER in x[3]]
  52. print "openge groups is: "
  53. print groups
  54. groups.append(gid)
  55. try:
  56. print "openge trying os.setgroups"
  57. os.setgroups(groups)
  58. except AttributeError:
  59. print "openge unable to setgroups"
  60. # Python 2.1 doesn't have setgroups
  61. syslog('error', 'Warning: unable to setgroups(%s)' % groups)
  62. os.setgid(gid)
  63. os.setuid(uid)
  64. elif myuid <> uid:
  65. name = mm_cfg.MAILMAN_USER
  66. usage(1, _(
  67. 'Run this program as root or as the %(name)s user, or use -u.'))
  68. print "openge exiting check_privs"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement