Hi,
What permissions does the minecraft user need?
I've got the user set up using useradd --system --no-create-home --home /opt/minecraft -g minecraft minecraft yet when executing minecraftctl start {instance name} either with the user minecraft or root I get the following prompt.
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'minecraft@{instance name}.service'.
Authenticating as: root
Password:
To get around this online sources mention the use of a sudoers entry, which I've tried the below as a catch-all for the moment yet it didn't work.
%minecraft ALL=(ALL) NOPASSWD:ALL
The only way I managed to get the script to run without the prompt is by using sudo and removing the below from minecraftctl
if [[ "$(id -un)" != "$MINECRAFT_USER" ]]; then
sudo -n -u "$MINECRAFT_USER" "$SAFE_SELF" "$@"
exit
fi
I'm sure I'm missing something,
Thanks in advance.
Linux version 5.4.0-77-generic (buildd@lgw01-amd64-028) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04))
Hi,
What permissions does the
minecraftuser need?I've got the user set up using
useradd --system --no-create-home --home /opt/minecraft -g minecraft minecraftyet when executingminecraftctl start {instance name}either with the userminecraftor root I get the following prompt.To get around this online sources mention the use of a sudoers entry, which I've tried the below as a catch-all for the moment yet it didn't work.
The only way I managed to get the script to run without the prompt is by using sudo and removing the below from
minecraftctlI'm sure I'm missing something,
Thanks in advance.
Linux version 5.4.0-77-generic (buildd@lgw01-amd64-028) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04))