Cannot (or should not) use root to register ejabberd users

Bug #1832408 reported by Jeff Davis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenSRF
New
Undecided
Unassigned

Bug Description

OpenSRF 3.1
Ubuntu 16.04.6
ejabberd 16.01-2

According to the OpenSRF install instructions, admins should use root when registering ejabberd users. But on Ubuntu 16.04, and likely on other systems with ejabberd 16 installed, the `ejabberdctl register` commands can fail with an error message like this:

/usr/sbin/ejabberdctl: line 428: 17208 Segmentation fault $EXEC_CMD "$CMD"

As a workaround, you can run those commands as the ejabberd user instead. The cause of the issue is an upstream bug (LP#1659801); the bug is apparently fixed in later ejabberd packages, but I wonder if the install instructions should be updated to use the ejabberd user when issuing ejabberdctl commands anyhow. I believe the Evergreen ansible installer already uses the ejabberd user for this step.

Revision history for this message
Jeff Davis (jdavis-sitka) wrote :
Revision history for this message
Jason Stephenson (jstephenson) wrote :

FWIW, I have never had a problem doing that step with sudo. I install on Ubuntu 16.04 all the time.

Revision history for this message
Jason Boyer (jboyer) wrote :

I've had a chance to poke at this just in the last few days. It appears there's a difference between systems installed fresh with 16.04 and those upgraded from 14.04. On my fresh install system I can use sudo ejabberdctl ... without any issue, but on my upgraded machine I had to either change the apparmor profile or use sudo -u ejabberd ejabberdctl ... instead.

As an added wrinkle the fresh install was directly on real hardware and the upgrade was a VM on another machine, so there may be more than one variable that contributes to this problem.

Since it seems to keep coming up and is inconsistent it may be worth considering just suggesting using sudo -u to prevent it from being a problem in the future. If we have to make a note in the docs to the effect of "In case you see this go sideways, try this..." we may as well just change the instructions to the method that always works.

Revision history for this message
Jason Stephenson (jstephenson) wrote :

The bulk of my experience has been with fresh installations of Ubuntu 16.04 on virtual machines, using libvirt with qemu-kvm. I have never had an issue using sudo with the ejabberdctl steps in that environment.

I did upgrad a VM from Ubuntu 14.04 to 16.04 several years ago, but I don't recall if I had any issues with that step, or if I even performed that step given that the VM already had OpenSRF and Evergreen installed.

Revision history for this message
Jason Stephenson (jstephenson) wrote :

Can't edit a comment, so yeah, I tyoped upgrade as "upgrad."

But, I meant to add that I agree with Jason about adding sudo -u ejabberd to the ejabberdctl steps for Ubuntu.

(I don't like typing in web forms, do you?)

Revision history for this message
Ben Shum (bshum) wrote :

Add milestone, plan to resolve alongside other changes to OpenSRF readme for next major series.

Changed in opensrf:
milestone: none → 3.2-beta
Galen Charlton (gmc)
Changed in opensrf:
milestone: 3.2-beta → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.