I setup a minecraft server on a Ubuntu system. When I launch the server from the command line, the server listens to the standard input and responds to various commands (such as changing the game mode, difficulty level or time of day):
(See this demo of entering commands into the server console)
I don't like locking up my root user to run minecraft, though, so today I setup a system user named, simply, "minecraft":
sudo adduser --system --no-create-home --home /srv/minecraft-server minecraft sudo addgroup --system minecraft sudo adduser minecraft minecraft # this adds user "minecraft" the group "minecraft"
and I'm using a config file to launch the minecraft server under that user:
start on runlevel  console log chdir /minecraft_server setuid minecraft setgid minecraft respawn respawn limit 20 5 exec /usr/bin/java -Xms1024M -Xmx1800M -jar minecraft_server.1.8.jar nogui
I want to send commands to the minecraft server via the standard input, just as I'm able to when I launch it under the current user. I've tried
sudo, but the first seems to be ignored and the second produces a "command not found" error. Since minecraft is a system user, I'm guessing that interactive login is disabled.
I've worked with linux systems a little in the past, but I'm out of my depth here. How can I pass along commands to the minecraft user to pass along to the minecraft server? Or is that not possible in my current situation?