Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

specify su shell #1080

Closed
wants to merge 1 commit into from
Closed

specify su shell #1080

wants to merge 1 commit into from

Conversation

hamano
Copy link
Contributor

@hamano hamano commented Apr 21, 2016

This script written in bash.
So it will fail depends login shell of INSTALLUSER.
Also we'll get following error when setting /usr/sbin/nologin for login shell:

# ejabberdctl
This account is currently not available.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.003%) to 31.409% when pulling a2b71ef on hamano:su_shell into 8487b51 on processone:master.

@cromain cromain self-assigned this Apr 21, 2016
@weiss
Copy link
Member

weiss commented Apr 21, 2016

You're using su(1)'s --shell flag which won't work on non-Linux systems.

@hamano
Copy link
Contributor Author

hamano commented Apr 21, 2016

hmm, BSD su have -s option, but MacOS seems haven't it.
Also I tried to replace sudo but it does not work. cuz environ value does not passed.

            if hash sudo 2>/dev/null; then
                EXEC_CMD="sudo -u $INSTALLUSER bash -c"
            else
                EXEC_CMD="su $INSTALLUSER -c"
            fi

Ok, I'll just use sudo -u ejabberd ejabberdctl (a little long...) so that I don't want to set login shell for system user.
You may want to ignore the trivial issue.
Thank you.

@cromain
Copy link
Contributor

cromain commented Apr 22, 2016

indeed, i'll go the 'sudo -u ejabberd ejabberdctl' way as ejabberdctl will not be able to cope with all possible environments just using su

@cromain cromain closed this Apr 22, 2016
@lock
Copy link

lock bot commented Jun 10, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants