-
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
User not recognized #282
Comments
I am having the same problem using Minecraft Server Manager 0.8.16 Beta |
I've been a MSM user for about 2 hours now, and just encountered this problem and found this issue via Google. Looking through the code, this is a (mostly cosmetic) bug in 0.8.16 in line 1217 of the main msm script. To fix, open etc/init.d/msm in a text editor and change line 1217 from this: as_user "$USERNAME" "echo \"MSM requires all your worlds be moved into this directory.\" > '$SETTINGS_SERVER_STORAGE_PATH/$1/$SETTINGS_DEFAULT_WORLD_STORAGE_PATH/readme.txt'" to this: as_user "$SETTINGS_USERNAME" "echo \"MSM requires all your worlds be moved into this directory.\" > '$SETTINGS_SERVER_STORAGE_PATH/$1/$SETTINGS_DEFAULT_WORLD_STORAGE_PATH/readme.txt'" The error you see is actually coming from the as_user function. This function compares the value passed to it (in this case, the erroneously empty variable $USERNAME instead of the properly populated $SETTINGS_USERNAME) with the output from 'whoami' and triggers this error if the two don't match (line 92): error_exit INVALID_USER "This command must be executed as the user \"$1\" or \"root\"." This bug simply prevents some text guidance from being displayed to the end user (about MSM requiring worlds to be moved into a certain directory). It doesn't affect the actual functionality of the created server. |
@ghandye - Thanks for commenting. If you wouldn't mind creating a pull request for this, I'd be happy to test and approve your commit. I should have time to do this tomorrow either way, if you don't have time to create the pull request. Thanks again. |
Thanks! I have to confess that I have never contributed to a project via -Andy On Sat, Jul 18, 2015 at 2:56 PM, Blaine Motsinger [email protected]
|
@ghandye - I did a bit of research this evening into this. It appears this issue was previously addressed and can be seen in the following: |
I see the fix in master (on line 1308 now, but things do change). I think I've figured out git fork/pull for next time. Thanks! |
My apologies on the link, L1308 is the correct one. |
Closing this then since it seems to be fixed ✨. |
I edited
/etc/msm.conf
to change the default user to "mcservers" and all the default paths to point to/home/mcservers
instead of/opt/msm
(the moving directories does not apply specifically to this problem-it occurs regardless of where the server folders are located). Now the problem is whenever I try to execute a command (such as, let's say,msm server create example
), the following gets outputted:Yet the command still executes. This is the part that really confuses me. I took a quick peek at the source code, and
whoami
returnsmcservers
as expected. It looks like MSM isn't detecting my custom username in the config correctly.USERNAME="mcservers"
andDEFAULT_USERNAME="mcservers"
.If you need the entire config file let me know.
The text was updated successfully, but these errors were encountered: