https://bugs.koozali.org/show_bug.cgi?id=8056

Jean-Philippe Pialasse <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|8.0                         |10.0

--- Comment #12 from Jean-Philippe Pialasse <[email protected]> ---
moving to sme 10 always present

should have been fix ins pec file of smeserver-mailman but no go for this user


(In reply to Smitro )
> I recently upgraded from 9.2 to 10 and with Ezmlm not yet available I've
> installed the mailman package for the first time.
> 
> I'm getting the CGI Error that a lot of people have reported. I followed the
> instructions and found that the id for www and apache are already 102.
> 
> After reading a lot of bug reports, I've found the problem but not sure how
> to fix.
> 
> # egrep "(apache|www):" /etc/group
> www:x:102:admin,apache,www
> apache:x:102:
> [...] 
> Here are my version details:
> mailman-2.1.15-30.el7_9.2.x86_64
> smeserver-mailman-1.5.0-10.el7.sme.noarch

you have another issue : apache and www are by default associated to their own
group as major group

egrep "(apache|www):" /etc/passwd
www:x:102:102:SME Server web server:/home/e-smith:/bin/false
apache:x:102:102:Apache:/var/www:/sbin/nologin


egrep "(apache|www):" /etc/group
www:x:102:admin
apache:x:102:

as per bug # 8056 a script in the spec file should fix that but reading the
test done and your group line I understand the test is not optimal

%pre
/sbin/e-smith/create-system-user mailman 41 \
    "Mailman user" /usr/lib/mailman /bin/false

#mailman wants that the apache group appears  before the www group in
/etc/group [SME: 8056]
TEST=$(grep -P '^www|apache' /etc/group)
TEST2='www:x:102:admin
apache:x:102:'

if [[ $TEST == $TEST2 ]]; then
    WWW=$(sed -n '/^www/p' /etc/group)
    sed -i '/^www/d' /etc/group
    echo $WWW >> /etc/group
fi



the test most probably fails because of the line not matching
'www:x:102:admin
apache:x:102:'

is not equal  to
'www:x:102:admin,apache,www
apache:x:102:'


should rather do 
TEST=`egrep "^apache:" /etc/group -n| cut -f1 -d:`
TEST2=`egrep "^www:" /etc/group -n| cut -f1 -d:`
if [[ $TEST > $TEST2 ]]; then
    #WWW=$(sed -n '/^www/p' /etc/group)
    #sed -i '/^www/d' /etc/group
    echo youpi #$WWW >> /etc/group
fi

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
_______________________________________________
Mail for each SME Contribs bug report
To unsubscribe, e-mail [email protected]
Searchable archive at https://lists.contribs.org/mailman/public/contribteam/

Reply via email to