-
Notifications
You must be signed in to change notification settings - Fork 225
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
Here is my sudoers and local/bin wrapper files #328
Comments
Excellent, just to be clear, none of the other users require sudo correct? And this only effects the msm command not if they edit any of the files under the msm storage (Such as plugin configs) I dont see anything about edits but just wanted to check. |
Yes it is only for running the msm commands without password prompt. I did another wrapper called msh which basically gives a shell as the minecraft user, intended to be used when downloading plugins and editing configuration files. Can upload if you are interested. Regards, Sent from my Sony Xperia™ smartphone ---- derrickmehaffy wrote ---- Excellent, just to be clear, none of the other users require sudo correct? And this only effects the msm command not if they edit any of the files under the msm storage (Such as plugin configs) I dont see anything about edits but just wanted to check. — |
Yeah I would be, working on trying to keep access to the server as limited
|
[bent@tux2 ~]$ cat /usr/local/bin/msh [bent@tux2 ~]$ sudo cat /etc/sudoers.d/msm Basic, but gets the job done: |
[root@tux2 ~]# cat /usr/local/bin/msm
!/bin/bash
if test
whoami
= "minecraft" ; then/etc/init.d/msm $*
else
pushd ~minecraft >&/dev/null
sudo -u minecraft /etc/init.d/msm $*
popd >&/dev/null
fi
[root@tux2 ~]# cat /etc/sudoers.d/msm
%minecraft ALL = (minecraft) NOPASSWD: /etc/init.d/msm *
[root@tux2 ~]#
The effect is that all users in the "minecraft" group can run msm directly - as the minecraft user so files will always get the right ownership and such.
Feel free to include, modify or discard
The text was updated successfully, but these errors were encountered: