Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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.
- Have checked permissions, mm_cfg.py, no /var/lock/subsys/mailman.
- No output when tried to start using ./mailmanctl start either.
- This is a server transfer, but only hostname has changed.
- mailman.host.com to simply host.com
- changed DEFAULT_URL_HOST and DEFAULT_EMAIL_HOST to host.com
- ran the ./withlist command on all lists to change the URL to host.com
- The old host was also RHEL5.5, mailman-2.1.9-4.el5.
- check_perms returns no problems found.
- managed to uninstall with rpm -e --noscripts mailman
- reinstalled with yum
- still hangs.
- enabled /bin/bash on mailman user
- sudo su mailman
- ran mailmanctl -s start
- and it starts.
- So..why won't mailman start as root, including as a service?
- Added debug print statements to mailmanctl, this is the results.
- openge entered check_privs
- openge gid is:
- 41
- openge uid is:
- 41
- openge myuid is:
- 0
- openge check_privs - entered myuid == 0
- ...hangs on the line
- groups = [x[2] for x in grp.getgrall() if mm_cfg.MAILMAN_USER in x[3]]
- def check_privs():
- print "openge entered check_privs"
- # If we're running as root (uid == 0), coerce the uid and gid to that
- # which Mailman was configured for, and refuse to run if we didn't coerce
- # the uid/gid.
- gid = grp.getgrnam(mm_cfg.MAILMAN_GROUP)[2]
- print "openge gid is: "
- print gid
- uid = pwd.getpwnam(mm_cfg.MAILMAN_USER)[2]
- print "openge uid is: "
- print uid
- myuid = os.getuid()
- print "openge myuid is: "
- print myuid
- if myuid == 0:
- print "openge check_privs - entered myuid == 0"
- # Set the process's supplimental groups.
- groups = [x[2] for x in grp.getgrall() if mm_cfg.MAILMAN_USER in x[3]]
- print "openge groups is: "
- print groups
- groups.append(gid)
- try:
- print "openge trying os.setgroups"
- os.setgroups(groups)
- except AttributeError:
- print "openge unable to setgroups"
- # Python 2.1 doesn't have setgroups
- syslog('error', 'Warning: unable to setgroups(%s)' % groups)
- os.setgid(gid)
- os.setuid(uid)
- elif myuid <> uid:
- name = mm_cfg.MAILMAN_USER
- usage(1, _(
- 'Run this program as root or as the %(name)s user, or use -u.'))
- print "openge exiting check_privs"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement