[Mailman-Users] Bug in Mailman version 2.1

Richard Barrett r.barrett at openinfo.demon.co.uk
Sat Apr 19 17:22:34 CEST 2003


I doubt this is a bug in Mailman. It is an installation anomaly (aka foulup).

At 18:35 18/04/2003, Mike Gideon wrote:
>My brain is hurting today, I am obviously working backwards today.
>I read the INSTALL file you just recommended to someone else this morning.
>I installed the TARBALL to different machine because redhat did not give
>me any docs, anyway
>bin/check_perms give me
>[root at listserv mailman]# bin/check_perms
>Traceback (most recent call last):
>   File "bin/check_perms", line 51, in ?
>     MAILMAN_GID = grp.getgrnam(MAILMAN_GROUP)[2]
>KeyError: getgrnam(): name not found

Having read the Mailman INSTALL file carefully, when you ran ./configure 
prior to installing Mailman you either defined the Mailman User and Mailman 
Group using --with-username and --with-groupname options or you let the 
defaults of 'mailman' and 'mailman' be used. You did this after verifying 
that both the user and group were defined on your system. You could of 
course check this, on Linux, from the command line, substituting for the 
user and group names you plan on using, as follows:

If you are using files for user and group information:

barrett at mailman2:/mailman/run/bin> grep mailman /etc/passwd
mailman:x:????:18:The Mailman:????:????
barrett at mailman2:/mailman/run/bin> grep mailman /etc/group

(I have substituted ???? in the above for information I do not want to 
reveal about my system)

or if you are using NIS

barrett at mailman2:/mailman/run/bin> ypcat passwd | grep mailman
mailman:x:????:18:The Mailman:????:????
barrett at mailman2:/mailman/run/bin> ypcat group | grep mailman

The consequence the ./configure is that during the make install two Mailman 
configuration variables were defined in the file 
$prefix/Mailman/Defaults.py. Typically, if you let ./configure take the 
defaults, Defaults.py will contain the lines, amongst many other things:

     MAILMAN_USER = 'mailman'
     MAILMAN_GROUP = 'mailman'

The exception, when you are running $prefix/bin/check_perms, is telling you 
that when it tries to use the Python grp module to determine the numeric 
gid of the group Mailman should run as, it could not find a definition for 
that Mailman Group name.

One way or another, the exception is telling you the Mailman Group is not 
properly defined.

You can try for yourself by running Python from the command line as 
follows, just make sure to run with $prefix/bin as current working 
directory or you will get an exception when importing paths.

If all is well you will get the following results. If the Mailman group is 
misconfigured then your get an exception to the call to the grp.getgrnam 
function, just as the check_perms script is doing:

barrett at mailman2:/mailman/run/bin> python
Python 2.2.2 (#3, Feb 11 2003, 16:57:53)
[GCC 2.95.3 20010315 (SuSE)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import paths
 >>> from Mailman import mm_cfg
 >>> from Mailman.mm_cfg import MAILMAN_USER, MAILMAN_GROUP
mailman mailman
 >>> import grp
 >>> MAILMAN_GID = grp.getgrnam(MAILMAN_GROUP)[2]
 >>> print MAILMAN_GID
 >>> import sys
 >>> sys.exit()
barrett at mailman2:/mailman/run/bin>

If the Mailman User and Group are correctly defined, you ran ./configure 
with the right options/values and you are still getting the problem with 
check_perms after doing the make install you should post again to the list 
with further information.

>I guess I should just make a new thread on that.  I can't find anything
>from google on it.
>"Mike Gideon" <mike at miis.edu> writes:
> >Hi Todd,
> >Thanx! You are right.  I must apologize.  I read through the readme, and
> >gave the owner/ rights a once over.  They looked okay when I looked.  I
> >need to be a little more maticulate, and not assume it was set up right in
> >the first place.  Did you know that right off the top of your head?
> >
> >Do you have any idea why I get this message when I try and start the
> >mailman service?
> >[root at listserv mailman]# service mailman start
> >Traceback (most recent call last):
> >  File "/var/mailman/bin/mailmanctl", line 524, in ?
> >    main()
> >  File "/var/mailman/bin/mailmanctl", line 319, in main
> >    check_privs()
> >  File "/var/mailman/bin/mailmanctl", line 274, in check_privs
> >    gid = grp.getgrnam(mm_cfg.MAILMAN_GROUP)[2]
> >KeyError: getgrnam(): name not found
> >
> >
> >I do have a mailman group and it is numberd 41.  I remember a few years
> >ago reading something about mailman being group 41 when i was playing with
> >an older version of mailman.
> >
> >Mike
> >
> >
> >
> >Todd <Freedom_Lover at pobox.com> writes:
> >>This is a FAQ.  See:
> >>
> >>    http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq06.009.htp
> >>
> >>Your permissions on data/aliases are likely incorrect.
> >

More information about the Mailman-Users mailing list